I have tested around and found this statement to work so far. Perhaps you can tell me if there may be a circumstance where this will yield an incorrect date such as the first or last date of a month?
DATE(DIGITS( DECIMAL(npdt7 +0.90000,7,0))) AS MyDATE
If there is any correlation to your...
When I try just the last part of your post - DateAdd(Year, NPDT7 / 1000 - 1900, NPDT7 % 1000-1)
I get [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token % was not valid. Valid tokens: ),.
Could this be an incompatible token?
Thanks for the reply.
I now wonder if I have posted my question in the correct forum as I really was needing the SQL select statement construct for converting from the julian to a "readable" date such as mm/dd/yyyy.
I apologize if I have incorrectly posted or did not grasp your post...
Hi all,
I have searched a great deal for a solution but can't find my exactly what I need, or at least I can't put it all together.
First I need to retrieve a stored date from my AS400 and return it in a date format of mm/dd/yyyy or mm/dd/yy.
All date fields have a corresponding numeric 7,0...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.