pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Eric McKeown <ericm@palaver.net>
To: PGsql <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] parts of date_part()
Date: Wed, 26 Aug 1998 11:57:16 +0300
Message-ID: <l03110704b2097cbdee1a@[147.233.159.109]> (raw)
In-Reply-To: <Pine.LNX.3.96.980824182856.299A-100000@farout.palaver.net>

At 2:33 +0300 on 25/8/98, Eric McKeown wrote:


>
> Well, I've done some digging in the FAQ, the user documentation, and the
> man pages, so I hope nobody screams 'RTFM' on this question, but I suppose
> you're welcome to if it was somewhere obvious and I missed it.
>
> I'm looking for a complete list of the different "date parts" that I can
> use to extract information about a given datetime value in a table.

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.

So...

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (5+ messages)  latest in thread

Message-ID: <l03110704b2097cbdee1a@[147.233.159.109]>
Permalink:  ../l03110704b2097cbdee1a@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03110704b2097cbdee1a@[147.233.159.109]

 · 

reply

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: herouth@oumail.openu.ac.il, ericm@palaver.net
  Subject: Re: [SQL] parts of date_part()
  In-Reply-To: <l03110704b2097cbdee1a@[147.233.159.109]>
  References: <Pine.LNX.3.96.980824182856.299A-100000@farout.palaver.net> <l03110704b2097cbdee1a@[147.233.159.109]>

* 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