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 33F4A565CB for ; Thu, 10 Mar 2005 20:43:56 +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 53700-08 for ; Thu, 10 Mar 2005 20:43:52 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 76FAA564D7 for ; Thu, 10 Mar 2005 20:43:49 +0000 (GMT) Received: (qmail 17813 invoked from network); 10 Mar 2005 20:42:49 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 10 Mar 2005 20:42:49 -0000 Message-ID: <4230B180.7060104@fastcrypt.com> Date: Thu, 10 Mar 2005 15:43:44 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lennie De Villiers Cc: pgsql-jdbc@postgresql.org Subject: Re: PostGreSQL Date Query? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.041 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/105 X-Sequence-Number: 12497 That's very strange. have you tried the query in psql. Also you can use the between clause. I'd also recommend using prepared statements and setDate, just to make sure the date is formatted correctly. Dave 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. > > Anyone can help me. > > > > Using Java 2 SE 1.4.2, PostGreSQL 8.0 > > > Kind Regards, > > > > Lennie De Villiers > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561