I have a string "2016-10-25T00:14:30.000"
in PostgreSQL.
I want to convert the timestamp to an integer, e.g: 1477354441
And I want to add custom minutes to that value, e.g. 1477354441+544(minutes) = 1477387081
How to achieve this in PostgreSQL?
SELECT EXTRACT(EPOCH FROM TIMESTAMP '2016-10-25T00:14:30.000');
SELECT EXTRACT(EPOCH FROM TIMESTAMP '2016-10-25T00:14:30.000' + INTERVAL '544 min');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With