|
<snip>
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).
</snip>
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
Or
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.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.