Re: [SQL] parts of date_part() - Mailing list pgsql-sql

From Leslie Mikesell
Subject Re: [SQL] parts of date_part()
Date
Msg-id 199808261653.LAA18509@Venus.mcs.net
Whole thread Raw
In response to Re: [SQL] parts of date_part()  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Responses Re: [SQL] parts of date_part()
List pgsql-sql
According to Herouth Maoz:
>
> Actually, it is an RTFM...
>
> >From the manpage of pgbuiltin (my postgres version is 6.2.1):
>
>      For the date_part() and  date_trunc()  functions,  arguments
>      can   be  `year',  `month',  `day',  `hour',  `minute',  and
>      `second',  as  well  as  the  more  specialized   quantities
>      `decade',   `century',   `millenium',   `millisecond',   and
>      `microsecond'.  date_part() allows `dow' to  return  day  of
>      week  and  `epoch' to return seconds since 1970 for datetime
>      and 'epoch' to return total elapsed seconds for timespan.

Is there any documentation (or is any needed) for the equivalent functions
mapped to their SQL92  "extract (field from value)" syntax?

Since I just ran across:
psql=> select date_part('month','01-01-1998'::date);
date_part
---------
       12
(1 row)
and the extract() does the same in this case, I'm being a little cautious...

 Les Mikesell
   les@mcs.com

pgsql-sql by date:

Previous
From: Leslie Mikesell
Date:
Subject: Re: [SQL] excel vs. money data type?
Next
From: Ian Johnston
Date:
Subject: How do I ???