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.
Read DB2 data - Date Format problem
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Read DB2 data - Date Format problem
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. Thanksbart12872 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.
g.kiran