Page 1 of 1

String to DATE (YYYYMMDD) conversion Error

Posted: Tue Aug 05, 2008 8:50 pm
by cosec
I am doing some tests to load a date YYYYMMDD from a sequential file that needs to be stored as YYYYMMDD in a DB2 table.

In the DB2 Table the data type for the DUE_DT is DATE

I use the following conversion rule
Iconv(Input.DUE_DT,"DYMD")

but the result is displayed as YYYY-MM-DD 00:00:00.0

Is there a conversion that I could use to display the DUE_DT as YYYYMMDD in the DB2 table ?

Please Assis

Posted: Tue Aug 05, 2008 8:52 pm
by ray.wurlod
"Displayed" using what utility?

Posted: Tue Aug 05, 2008 9:59 pm
by cosec
ray.wurlod wrote:"Displayed" using what utility? ...
Displayed using Utility tool 'Squirrel'.......Is the problem I am having due to the default setting of the Utility tool ?

Posted: Tue Aug 05, 2008 10:11 pm
by ray.wurlod
Probably. DB2 stores dates as datetime data types. Change the format in the tool to a date-only format if that's what you require. But it makes no difference to how the dates are stored.

Posted: Wed Aug 06, 2008 7:40 am
by chulett
ps. You're not having a problem, a DATE is a DATE regardless of the format some tool displays it in.