Received: from Kitten.mcs.com (Kitten.mcs.com [192.160.127.90]) by hub.org (8.8.8/8.7.5) with ESMTP id MAA03320 for ; Wed, 26 Aug 1998 12:53:42 -0400 (EDT) Received: from Venus.mcs.net (les@Venus.mcs.net [192.160.127.92]) by Kitten.mcs.com (8.8.7/8.8.2) with ESMTP id LAA22349; Wed, 26 Aug 1998 11:53:41 -0500 (CDT) Received: (from les@localhost) by Venus.mcs.net (8.8.7/8.8.2) id LAA18509; Wed, 26 Aug 1998 11:53:39 -0500 (CDT) From: Leslie Mikesell Message-Id: <199808261653.LAA18509@Venus.mcs.net> Subject: Re: [SQL] parts of date_part() To: herouth@oumail.openu.ac.il (Herouth Maoz) Date: Wed, 26 Aug 1998 11:53:39 -0500 (CDT) Cc: ericm@palaver.net, pgsql-sql@postgreSQL.org In-Reply-To: from "Herouth Maoz" at Aug 26, 98 11:57:16 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text 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