Page 1 of 1

Iconv returns Null

Posted: Tue Mar 20, 2007 1:46 am
by jojipjohn
I have a strange problem. When I am using Iconv function in our production system, What ever be the format I give Its giving me NULL as output.

For Example
I used Iconv("31 DEC 1967","D") ( This is an example given in the Online Manual)
Ideally I should get 0 as output, but I am getting Null.

Is it because of some problem with the setup that Iconv is not working.

however When I am Using Iconv(@Date,"D"), I am getting valid output

Can anyone help me with this please.

Posted: Tue Mar 20, 2007 1:55 am
by jojipjohn
We are using NLS setting in our server. Does this creates a problem

Posted: Tue Mar 20, 2007 2:20 am
by jojipjohn
Its Resolved.... We were using NLS setting and I Changed the settings to default for this job and it is working.

Posted: Tue Mar 20, 2007 6:20 am
by ray.wurlod
Whether you're using NLS or not, you can be specific about the order of components in the date, and Iconv() will always work. For example, in your case: Iconv("31 DEC 1967", "DDMY").

Read this wiki entry to enhance your understanding.