Re: date ranges in where - Mailing list pgsql-general

From Erik Jones
Subject Re: date ranges in where
Date
Msg-id 8E4CA9C3-3C56-49DF-89A1-6EE2B78C01C9@engineyard.com
Whole thread Raw
In response to Re: date ranges in where  (Miguel Miranda <miguel.mirandag@gmail.com>)
Responses Re: date ranges in where
Re: date ranges in where
List pgsql-general
On May 6, 2009, at 2:48 PM, Miguel Miranda wrote:

> Well, i tried all your sugestions, and i found some funny issues, i
> use the query to count exactly in a day by day basis, and running
> the query with
>
> WHERE lastlogin >= '2009-05-01' AND lastlogin < '2009-05-03'
>
> OR
>
> WHERE lastlogin >= 'X' AND lastlogin <= 'Y' + '1 day'::interval
>
>
> it includes the 0 hours of day 3:
>
> 05-02-2009 12:00:00 AM

No, 05-02-2009 12:00:00 AM is the midnight point between 2009-05-01
and 2009-05-02.

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k






pgsql-general by date:

Previous
From: Miguel Miranda
Date:
Subject: Re: date ranges in where
Next
From: "Joshua D. Drake"
Date:
Subject: PgUS 501c3 Public Charity