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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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