I'm new to Informix, and I'm trying to convert a bigint to a datetime.
SELECT sdatetime
FROM CallDetail;
Results:
sdatetime
----------
1572509662678
1572518550704
1572519033540
This seems to be the number of ms from 1-1-1970 but I can't get the syntax right to convert this. The closest I got was getting a date with no time. I need both.
How can I do this?
Best Answer
One way to do it is with this procedure:
You'd use:
Example output:
I suspect there may now be a built-in method to achieve an equivalent result, but I've forgotten (or never learned) what it is.