File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1- <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.484 2009/08/03 21:11:39 joe Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.485 2009/08/10 16:10:19 tgl Exp $ -->
22
33 <chapter id="functions">
44 <title>Functions and Operators</title>
@@ -6239,8 +6239,8 @@ SELECT EXTRACT(DOY FROM TIMESTAMP '2001-02-16 20:38:40');
62396239 </para>
62406240
62416241<screen>
6242- SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08');
6243- <lineannotation>Result: </lineannotation><computeroutput>982384720</computeroutput>
6242+ SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40.12 -08');
6243+ <lineannotation>Result: </lineannotation><computeroutput>982384720.12 </computeroutput>
62446244
62456245SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
62466246<lineannotation>Result: </lineannotation><computeroutput>442800</computeroutput>
@@ -6250,10 +6250,13 @@ SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
62506250 Here is how you can convert an epoch value back to a time
62516251 stamp:
62526252 </para>
6253-
62546253<screen>
6255- SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * INTERVAL '1 second';
6254+ SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720.12 * INTERVAL '1 second';
62566255</screen>
6256+ <para>
6257+ (The <function>to_timestamp</> function encapsulates the above
6258+ conversion.)
6259+ </para>
62576260 </listitem>
62586261 </varlistentry>
62596262
You can’t perform that action at this time.
0 commit comments