I have a timestamp in epoch format like this: 1551187548876
. If I convert this to a timestamp using https://www.epochconverter.com/, I get the correct time back.
However, if I convert it to time using PostgreSQL to_timestamp
, I get the following:
select to_timestamp(1551187548876) from my_table;
51125-03-06 14:14:36+00
Question
How can I convert epoch 1551187548876
to a timestamp in PostgreSQL?