Received: from www-uk-05.digiserve.com ([195.172.23.63]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0FFYa079983 for ; Mon, 15 Jan 2001 10:34:36 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id PAA09296; Mon, 15 Jan 2001 15:34:56 GMT Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id E41932A391; Mon, 15 Jan 2001 15:30:00 +0000 (GMT) Message-ID: <004701c07f08$0599b800$1001a8c0@archonet.com> From: "Richard Huxton" To: "Renato De Giovanni" , References: <3A63070C.F2661FED@viafractal.com.br> Subject: Re: Querying date interval Date: Mon, 15 Jan 2001 15:29:58 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200101/144 X-Sequence-Number: 805 ----- Original Message ----- From: "Renato De Giovanni" > Hi, > > Is there any SQL workaround to get the right results from the select > statement bellow? Or am I doing something wrong?? > > 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 > (3 rows) > Someone else mentioned DATESTYLE - the other thing to check is that you haven't got a local summertime adjustment on 30th Sep or 1st Oct - that caused issues in some previous versions of postgres IIRC (have a rummage in the archives) - Richard Huxton