day of week

Started by Anton Andreevover 18 years ago5 messagesgeneral
Jump to latest
#1Anton Andreev
anton.andreev@fmi.uni-sofia.bg

Hi,

I have records with date column. Is there a way I can get which day of
week this date is?

Cheers,
Anton

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Anton Andreev (#1)
Re: day of week

On 31/10/2007, Anton Andreev <anton.andreev@fmi.uni-sofia.bg> wrote:

Hi,

I have records with date column. Is there a way I can get which day of
week this date is?

Cheers,
Anton

Hello

http://www.postgresql.org/docs/8.2/interactive/functions-datetime.html
EXTRACT or function date_part

Regards
Pavel Stehule

Show quoted text

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

#3Thomas Kellerer
spam_eater@gmx.net
In reply to: Anton Andreev (#1)
Re: day of week

Anton Andreev wrote on 31.10.2007 15:34:

Hi,

I have records with date column. Is there a way I can get which day of
week this date is?

What about the extract() function with the dow parameter?

<http://www.postgresql.org/docs/8.2/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT&gt;

Thomas

#4A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Anton Andreev (#1)
Re: day of week

am Wed, dem 31.10.2007, um 16:34:44 +0200 mailte Anton Andreev folgendes:

Hi,

I have records with date column. Is there a way I can get which day of
week this date is?

Yes, no problem. select extract (dow from date).

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

#5Tomas Vondra
tomas.vondra@2ndquadrant.com
In reply to: Anton Andreev (#1)
Re: day of week

Hi,

I have records with date column. Is there a way I can get which day of
week this date is?

http://www.postgresql.org/docs/8.2/interactive/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

t.v.