Hello friends
I m using job parameter for date ,and datatype is date .
but when i enter the date as 0001-01-01 it gives output as 2005-01-01
similarly for 0002-01-01 gives 2002-01-01
0030-01-01 gives 1930-01-01
0099-01-01 gives 1999-01-01
0029-01-01 gives 2029-01-01
can u please say what is going on ?
regards
Hman
Problem while parameter for date
Moderators: chulett, rschirm, roy
Hi,
Seems like it's treating those as 2 digit years.
Is there any problem in using a string type instead?
(Trying to remember is there any configuration to force proper interpretation
)
Seems like it's treating those as 2 digit years.
Is there any problem in using a string type instead?
(Trying to remember is there any configuration to force proper interpretation
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard! :D
DataStage has rules for handling of two digit dates. They are converted into the century defined by the CENTURYPIVOT configuration parameter; by default the century 1930-2029.
It also appears that the underlying mechanism is treating 00yy as yy.
I have no explanation for '0001-01-01 it gives output as 2005-01-01' I would have expected 2001-01-01 given the other examples.
However, I would expect '0000-01-01' to generate 2005-01-01, since 0 is understood to be "current year". There is no year 0; the year before 1AD is 1BC.
Interestingly, the underlying query engine is unaffected. Iconv("0001-01-01", "DYMD") returns -718432 which converts back to 1 Jan 1AD.
DataStage has rules for handling of two digit dates. They are converted into the century defined by the CENTURYPIVOT configuration parameter; by default the century 1930-2029.
It also appears that the underlying mechanism is treating 00yy as yy.
I have no explanation for '0001-01-01 it gives output as 2005-01-01' I would have expected 2001-01-01 given the other examples.
However, I would expect '0000-01-01' to generate 2005-01-01, since 0 is understood to be "current year". There is no year 0; the year before 1AD is 1BC.
Interestingly, the underlying query engine is unaffected. Iconv("0001-01-01", "DYMD") returns -718432 which converts back to 1 Jan 1AD.
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.
date as a parameter
Hi Roy,
for datatype as string it gives appropriate value.
Thx
Hman
for datatype as string it gives appropriate value.
Thx
Hman