Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
frunixtime.spl | 2020-05-11 | 1.8 kB | |
tounixtime.spl | 2020-05-11 | 2.6 kB | |
unixtime_README | 2020-05-11 | 1.1 kB | |
Totals: 3 Items | 5.5 kB | 0 |
This is a FAQ. There are answers available from http://groups.google.com/; the code should be available at the IIUG web site. ...well...I thought there was... The inverse function, to_unix_time() certainly is out there! OK; here's a brand new stored procedure, FROM_UNIX_TIME(), that takes a DECIMAL value (to allow for fractional seconds; if you pass an integer, it will be converted automatically) and spits out a DATETIME YEAR TO FRACTION(5). And there's an upgraded TO_UNIX_TIME() that also handles fractional seconds. Sam Gentsch wrote: > Is there a function in SQL to change a integer which is > actually an Epoch or UNIX time to a human readable date? > (I have searched documentation and the web with no luck) > > The design was before my time, not sure why they chose > not to let Informix handle the date. > > If it matters, IDS 7.30 on Solaris 7 or 9.30 on Solaris 8. > > Sam Gentsch -- Jonathan Leffler (jleffler@us.ibm.com) STSM, Informix Database Engineering, IBM Data Management Solutions 4100 Bohannon Drive, Menlo Park, CA 94025 "I don't suffer from insanity; I enjoy every minute of it!"