Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting dates on AS400

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
Our AS400 application stores all of its dates in the format yyyymmdd (don't know why it doesn't store them as actual dates). I'm looking for an easy reformat them so that they are compatible with dates on DB2 8.2 AIX. I know I could do it with a bunch of substr functions and string concatenation, but I was wondering if anyone knows a cleaner way.
 
AFAIK in the old days AS400 could not store datefields at all, I have seen some pretty nasty formats (like 51103 or 105311)
JD Edwards on AS400 uses a format that is not transformable with a SQL function at all , so I am quite accustomed by adding a calender file to translate them to real dates


Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top