pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Scott Marlowe <smarlowe@g2switchworks.com>
Cc: Lennie De Villiers <lenniedg@lando.co.za>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PostGreSQL Date Query?
Date: Thu, 10 Mar 2005 15:45:22 -0500
Message-ID: <4230B1E2.10001@fastcrypt.com> (raw)
In-Reply-To: <1110487133.28555.7.camel@state.g2switchworks.com>
References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA7eJwAxNWM0C1nHgqelJlQsKAAAAQAAAA/2qJuDRRtES178L9Pf40owEAAAAA@lando.co.za>
	<1110487133.28555.7.camel@state.g2switchworks.com>

That's what I thought too, but pg should give him an error if he is 
asking for the 28th month.

Dave

Scott Marlowe wrote:

>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
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>
>  
>

-- 
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561




view thread (8+ messages)  latest in thread

Message-ID: <4230B1E2.10001@fastcrypt.com>
Permalink:  ../4230B1E2.10001@fastcrypt.com/
Also on:    postgresql.org/message-id/4230B1E2.10001@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com, smarlowe@g2switchworks.com, lenniedg@lando.co.za
  Subject: Re: PostGreSQL Date Query?
  In-Reply-To: <4230B1E2.10001@fastcrypt.com>
  References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA7eJwAxNWM0C1nHgqelJlQsKAAAAQAAAA/2qJuDRRtES178L9Pf40owEAAAAA@lando.co.za> <1110487133.28555.7.camel@state.g2switchworks.com> <4230B1E2.10001@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox