Re: date ranges in where
От | Adrian Klaver |
---|---|
Тема | Re: date ranges in where |
Дата | |
Msg-id | 200905061459.06499.aklaver@comcast.net обсуждение исходный текст |
Ответ на | Re: date ranges in where (Erik Jones <ejones@engineyard.com>) |
Ответы |
Re: date ranges in where
|
Список | pgsql-general |
On Wednesday 06 May 2009 2:51:08 pm Erik Jones wrote: > 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. The problem being that midnight is both the end of one day and the start of another. > > Erik Jones, Database Administrator > Engine Yard > Support, Scalability, Reliability > 866.518.9273 x 260 > Location: US/Pacific > IRC: mage2k -- Adrian Klaver aklaver@comcast.net
В списке pgsql-general по дате отправления: