Re: [despammed] How to get day of week?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Andreas Kretschmer <akretschmer(at)despammed(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [despammed] How to get day of week?
Date: 2004-12-21 16:32:08
Message-ID: 20041221163208.GA82969@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Dec 21, 2004 at 01:42:17PM +0100, Andreas Kretschmer wrote:
>
> select extract(dow from eingang) from a_buch ;

See also to_char() in the "Data Type Formatting Functions" section
of the "Functions and Operators" chapter in the documentation.

SELECT to_char(CURRENT_DATE, 'D,Dy,Day');
to_char
-----------------
3,Tue,Tuesday

Note that to_char() and extract() use different numbering for the
day of the week.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Keith Worthington 2004-12-21 17:22:49 syntax error in function
Previous Message Terry Lee Tucker 2004-12-21 15:13:53 Re: FOUND variable