Is there an easy way in the SQL interpreter to convert an integer to a
date? The original programmers thought it was cool to dump all
date/time fields into int 8/4 which sucks when you're trying to do
calculations on them (they also like to use a 25h clock, but that's a
whole other can of worms).
My free utility iDate at www.think400.dk/downloads.htm supports integer
so a simple
Select iDate(IntegerField,'*CCYMD') From YourFile
Will return a date data type.
If the default on your system is set to CCYMD, you only need.
Select iDate(IntegerField) From YourFile
The opposite function will convert from a date data type to integer.
Select ConvertToIdate(DateField,'*CCYMD') From YourFile
Select ConvertToIDate(DateField) From YourFile
iDate is a user defined function written in RPG/ILE for performance and
can handle just about anything.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.