Answers for "timestamps in postgres"

SQL
1

postgres get timestamp

SELECT CURRENT_TIMESTAMP;
Posted by: Guest on December-12-2020
0

unix timestamp postgres

set timezone to 0;

values(1, '1970-01-01 00:00:00+00'::timestamp::timestamptz)
    , (2, '1970-01-01 00:00:00+02'::timestamp::timestamptz);

/*
|column1|column2               |
|------:|:---------------------|
|      1|1970-01-01 00:00:00+00|
|      2|1970-01-01 00:00:00+00|
*/
Posted by: Guest on June-08-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language