X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0928E56589 for ; Thu, 10 Mar 2005 20:39:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52305-07 for ; Thu, 10 Mar 2005 20:38:54 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 825A7565C7 for ; Thu, 10 Mar 2005 20:38:53 +0000 (GMT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 10 Mar 2005 14:38:53 -0600 Subject: Re: PostGreSQL Date Query? From: Scott Marlowe To: Lennie De Villiers Cc: pgsql-jdbc@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1110487133.28555.7.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 10 Mar 2005 14:38:53 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/103 X-Sequence-Number: 12495 On Tue, 2005-03-08 at 15:51, Lennie De Villiers wrote: > Hi, > > > I'm using Java together with PostGreSQL database. > > > > I'm having a problem with a date query, when I write: > > > > select sRescheduleDate, * from tbl_leads > > where sRescheduleDate >= '01/01/2005' AND sRescheduleDate <= > '28/01/2005' > > and bRescheduleCall = true > > > > the query also return the values for "01/04/2005" where it should only > return those between that date range. Sounds like your month and day are not where you think they are. http://www.postgresql.org/docs/7.4/static/datatype-datetime.html#DATATYPE-DATETIME-INPUT