Re: PostGreSQL Date Query? - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: PostGreSQL Date Query?
Date
Msg-id 4230B180.7060104@fastcrypt.com
Whole thread Raw
In response to PostGreSQL Date Query?  ("Lennie De Villiers" <lenniedg@lando.co.za>)
List pgsql-jdbc
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


pgsql-jdbc by date:

Previous
From: Diego Gil
Date:
Subject: Re: PostGreSQL Date Query?
Next
From: Dave Cramer
Date:
Subject: Re: PostGreSQL Date Query?