String to DATE (YYYYMMDD) conversion Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

String to DATE (YYYYMMDD) conversion Error

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Displayed" using what utility?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Post 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 ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ps. You're not having a problem, a DATE is a DATE regardless of the format some tool displays it in.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply