Received: from janeway.cistron.net (janeway.cistron.net [195.64.65.23]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0FEaH075836 for ; Mon, 15 Jan 2001 09:36:17 -0500 (EST) (envelope-from jdassen@cistron-office.nl) Received: from odin (jdassen@odin.cistron-office.nl [195.64.65.236]) by janeway.cistron.net (8.9.3/8.9.3/Debian 8.9.3-6) with SMTP id PAA05440 for ; Mon, 15 Jan 2001 15:36:11 +0100 Received: by odin (sSMTP sendmail emulation); Mon, 15 Jan 2001 15:36:10 +0100 Date: Mon, 15 Jan 2001 15:36:10 +0100 From: "J.H.M. Dassen (Ray)" To: pgsql-sql@postgresql.org Subject: Re: Querying date interval Message-ID: <20010115153610.A30879@cistron-office.nl> Mail-Followup-To: pgsql-sql@postgresql.org References: <3A63070C.F2661FED@viafractal.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: <3A63070C.F2661FED@viafractal.com.br>; from rdg@viafractal.com.br on Mon, Jan 15, 2001 at 12:19:56PM -0200 X-Archive-Number: 200101/141 X-Sequence-Number: 802 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