Page 1 of 1

Read DB2 data - Date Format problem

Posted: Wed Feb 18, 2009 10:45 am
by bart12872
Well, I have a problem, and I have no idea where it could come from.

A DB2 Enterprise Stage read a table. The table contains dates.
When I do a view data, all the dates are '1901-01-01' the default value.

but when I do a CAST(column AS CHAR(10)), I obtain the good value but in the format 'MM/DD/YYYY'

I try to modify in the Datastage administrator the default format for date as '%mm/%dd/%yyyy' but the view data is still '1901-01-01'

I make a select in telnet from the db2 client and the good date is return.

You can imagine that I can't use to_char() for all date column.

Do you have an idea on how retrieve the good dates ?

thanks
Martin.

Posted: Wed Feb 18, 2009 3:31 pm
by ray.wurlod
Try either creating a new job (to pick up your new default that you set in Administrator) or changing the existing job's job properties to set the new format there.

Re: Read DB2 data - Date Format problem

Posted: Wed May 06, 2009 12:15 pm
by DSkkk
bart12872 wrote:Well, I have a problem, and I have no idea where it could come from.

A DB2 Enterprise Stage read a table. The table contains dates.
When I do a view data, all the dates are '1901-01-01' the default value.

but when I do a CAST(column AS CHAR(10)), I obtain the good value but in the format 'MM/DD/YYYY'

I try to modify in the Datastage administrator the default format for date as '%mm/%dd/%yyyy' but the view data is still '1901-01-01'


thanks
Martin.
Hi Martin- We are facing the Exact same Issue. Can u please Post the Resolution for this Issue as it would be a great help to us. Thanks