How to convert date time into unix epoch value in Postgres? March 31, 2023 by Tarik If your data is stored in a column called ts, in a table called data, do this: select extract(epoch from ts) from data