Re: Querying date interval

From: "J(dot)H(dot)M(dot) Dassen (Ray)" <jdassen(at)cistron-office(dot)nl>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Querying date interval
Date: 2001-01-15 14:36:10
Message-ID: 20010115153610.A30879@cistron-office.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Jan 15, 2001 at 12:19:56 -0200, Renato De Giovanni wrote:
> select * from testdate where field1 between '2000-10-01' and
> '2000-11-30' ;
>
> field1
> ------------
> 2000-09-30 <---- why is it here??
> 2000-10-20
> 2000-11-25

It works fine for me (7.0.3, Debian GNU/Linux "unstable").

I suspect your problem has to do with the "DATESTYLE" setting you're using;
does it help if you do "SET DATESTYLE TO 'ISO'" prior to INSERTing your test
values?

HTH,
Ray
--
[Open Source] is the finest expression of the free market. Ideas are
encouraged to proliferate and the best thinking wins. By contrast, most
corporations today operate in a central planning straitjacket.
http://www.thestandard.com/article/display/0,1151,15772,00.html

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-01-15 15:14:54 Re: Querying date interval
Previous Message Renato De Giovanni 2001-01-15 14:19:56 Querying date interval