From: Peter Eisentraut Date: Tue, 16 Dec 2003 15:27:58 +0000 (+0000) Subject: Add example for converting epoch back to timestamp. X-Git-Tag: REL8_0_0BETA1~1513 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b1a35b3c2e8ca4baf0199b2115fc77126aa0e2e;p=postgresql Add example for converting epoch back to timestamp. --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d73199fb20..5724b9b256 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -5005,6 +5005,15 @@ SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08'); SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours'); Result: 442800 + + + + Here is how you can convert an epoch value back to a time + stamp: + + + +SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * interval '1 second';