3

Is there a shorthand for the epoch instead of having to type '1970-1-1 00:00:00' all the time?

5

It is surprisingly 'epoch'

select 'epoch'::timestamp;
timestamp
1970-01-01 00:00:00
(1 row)

select TIMESTAMP 'epoch';
timestamp
1970-01-01 00:00:00
(1 row)

Special date/time inputs are described in the section 8.5.1.4 here:

timestamps

|improve this answer|||||
  • 1
    Oh, the magic of reading the documentation! :) – dezso Nov 23 '16 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.