I have a column with type numeric which consist date in timestamp format. I need to get a date in 'YYYY-MM-DD HH:mm:ss' format. My code:
select start_dt_timestamp, to_timestamp(start_dt_timestamp/1000) as dt
from tmp_table
In result:
| start_dt_timestamp | dt |
|---|---|
| 1554747217660018 | 51237-12-23 16:07:40 |
51237-12-23 16:07:40 - is not correct date. What I need to do get correct answer?
/1000correct, or should it be/1000000or something?