]> granicus.if.org Git - postgresql/commitdiff
Add date_trunc('', interval) documentation mention
authorBruce Momjian <bruce@momjian.us>
Thu, 23 Jan 2014 03:26:45 +0000 (22:26 -0500)
committerBruce Momjian <bruce@momjian.us>
Thu, 23 Jan 2014 03:26:45 +0000 (22:26 -0500)
Report from Eric Howe

doc/src/sgml/func.sgml

index 53021c227d7ea168dee01c0dd1dcc2d6b9325d67..e79c479ac31eae4f60aac0779ae159f4a774fe41 100644 (file)
@@ -6567,6 +6567,20 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
         <entry><literal>2001-02-16 20:00:00</literal></entry>
        </row>
 
+       <row>
+        <entry>
+         <indexterm>
+          <primary>date_trunc</primary>
+         </indexterm>
+         <literal><function>date_trunc(<type>text</type>, <type>interval</type>)</function></literal>
+        </entry>
+        <entry><type>interval</type></entry>
+        <entry>Truncate to specified precision; see also <xref linkend="functions-datetime-trunc">
+        </entry>
+        <entry><literal>date_trunc('hour', interval '2 days 3 hours 40 minutes')</literal></entry>
+        <entry><literal>2 days 03:00:00</literal></entry>
+       </row>
+
        <row>
         <entry>
          <indexterm>