Reputation: 109
Lets do the following:
SELECT to_timestamp(1453336500)::date
Then i get a date 2016-01-21
How does the function work backwards. With the date as input and the number (i guess seconds from 1970) as result?
Upvotes: 0
Views: 48
Reputation: 246073
You use extract
:
SELECT extract(epoch FROM current_timestamp);
Upvotes: 1