Read DB2 data - Date Format problem
Posted: Wed Feb 18, 2009 10:45 am
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.
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.