I want to convert type date unix to timestamp in Informix. My column date1 contains values as 1598915961, 1598911249, 1598911255...
expected output: 2020-02-13 15:00:00
How should I do it, please?
I want to convert type date unix to timestamp in Informix. My column date1 contains values as 1598915961, 1598911249, 1598911255...
expected output: 2020-02-13 15:00:00
How should I do it, please?
In Informix, you can use dbinfo()
and 'utc_to_datetime'
:
select dbinfo('utc_to_datetime', myepoch)
The idea is that you can add the seconds to the date '1970-01-01'
. I don't have Informix on-hand, but the syntax is something like this:
select datetime('1970-01-01') + interval date1 second