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 00E5253D6E for ; Thu, 10 Mar 2005 20:47: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 55484-07 for ; Thu, 10 Mar 2005 20:47:54 +0000 (GMT) Received: from mail.liquidcore.com (mail.liquidcore.net [68.17.96.60]) by svr1.postgresql.org (Postfix) with ESMTP id 31DC7565C9 for ; Thu, 10 Mar 2005 20:47:51 +0000 (GMT) Received: (from root@localhost) by mail.liquidcore.com (8.13.1/8.12.10) id j2AKljo3015572; Thu, 10 Mar 2005 14:47:45 -0600 Received: from ppasala3 (ppasala.nqadmin.com [192.168.0.7]) by mail.liquidcore.com (8.13.1/8.12.10) with SMTP id j2AKlhGV015525; Thu, 10 Mar 2005 14:47:45 -0600 From: "Prasanth" To: "Scott Marlowe" , "Lennie De Villiers" Cc: Subject: Re: PostGreSQL Date Query? Date: Thu, 10 Mar 2005 14:48:49 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-reply-to: <1110487133.28555.7.camel@state.g2switchworks.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-scanner: scanned for malicious content X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/107 X-Sequence-Number: 12499 >Sounds like your month and day are not where you think they are. In which case you will get an error message saying that "date/time field value out of range." -Prasanth. -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Scott Marlowe Sent: Thursday, March 10, 2005 2:39 PM To: Lennie De Villiers Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] PostGreSQL Date Query? 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-DA TETIME-INPUT ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend