summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut2003-12-16 15:27:58 +0000
committerPeter Eisentraut2003-12-16 15:27:58 +0000
commit4b1a35b3c2e8ca4baf0199b2115fc77126aa0e2e (patch)
tree1146c8454318e5c730fcc055282ded5aa7b33a7e /doc/src
parent0fb3ec1a58c25a454bcef3de43beaae092c2c7a3 (diff)
Add example for converting epoch back to timestamp.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index d73199fb20e..5724b9b2561 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.181 2003/12/13 23:59:06 neilc Exp $
+$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.182 2003/12/16 15:27:58 petere Exp $
PostgreSQL documentation
-->
@@ -5006,6 +5006,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');
<lineannotation>Result: </lineannotation><computeroutput>442800</computeroutput>
</screen>
+
+ <para>
+ Here is how you can convert an epoch value back to a time
+ stamp:
+ </para>
+
+<screen>
+SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * interval '1 second';
+</screen>
</listitem>
</varlistentry>