Skip site navigation (1) Skip section navigation (2)

date_part('dow', '2001-03-25') ??!

From: Dmitry Gercog <gda(at)omnet(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: date_part('dow', '2001-03-25') ??!
Date: 2001-03-26 08:43:49
Message-ID: 3ABF0145.6A6448CE@omnet.ru (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi! 

Why?

SELECT date_part('dow', '2001-03-24');
return '6'

and

SELECT date_part('dow', '2001-03-25');

return '6', but must be '0'!!!

For last Sunday '2001-03-18' this construction return '0'!

My system SuSe Linux 7.0
PostgreSQL version 7.0.3

When I use system command "date":

date +%w -d '2001-03-25'

I'm get correct result = '0'!

Dmitry Gercog.

Responses

pgsql-bugs by date

Next:From: Karel ZakDate: 2001-03-26 13:47:38
Subject: Re: date_part('dow', '2001-03-25') ??!
Previous:From: Rainer MagerDate: 2001-03-26 04:46:43
Subject: Dead locks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group