From: Leslie Mikesell <les@Mcs.Net>
To: herouth@oumail.openu.ac.il
Cc: ericm@palaver.net
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] parts of date_part()
Date: Wed, 26 Aug 1998 11:53:39 -0500 (CDT)
Message-ID: <199808261653.LAA18509@Venus.mcs.net> (raw)
In-Reply-To: <l03110704b2097cbdee1a@[147.233.159.109]>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: les@Mcs.Net, herouth@oumail.openu.ac.il, ericm@palaver.net
Subject: Re: [SQL] parts of date_part()
In-Reply-To: <199808261653.LAA18509@Venus.mcs.net>
References: <l03110704b2097cbdee1a@[147.233.159.109]> <199808261653.LAA18509@Venus.mcs.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox