date comparisons
От
Belinda M. Giardine
Тема
date comparisons
Дата
Msg-id
Pine.GSO.4.53.0612121125220.28737@galapagos.bx.psu.edu
Список
Дерево обсуждения
date comparisons "Belinda M. Giardine" <giardine@bio.cse.psu.edu>
Re: date comparisons Erik Jones <erik@myemma.com>
Re: date comparisons "Belinda M. Giardine" <giardine@bio.cse.psu.edu>
Re: date comparisons Richard Huxton <dev@archonet.com>
Re: date comparisons Tom Lane <tgl@sss.pgh.pa.us>
Re: date comparisons Bruce Momjian <bruce@momjian.us>
Re: date comparisons "Chad Wagner" <chad.wagner@gmail.com>
Re: date comparisons Bruce Momjian <bruce@momjian.us>
Re: date comparisons Richard Huxton <dev@archonet.com>
Re: date comparisons Tom Lane <tgl@sss.pgh.pa.us>
Re: date comparisons "Belinda M. Giardine" <giardine@bio.cse.psu.edu>
This should be simple but I am missing something. I am trying to extract
all records entered after a given date. The table has a field
date_entered which is a timestamp. In this particular case I am not
worried about time.
I have tried:
select id from main_table where
date_entered > to_timestamp('January 2006', 'Month YYYY');
select id from main_table where
(to_timestamp('January 2006', 'Month YYYY'), now()) overlaps (date_entered, date_entered);
Both of these return all the rows in the table. Half of the rows are
dated 2000-06-22 12:00:00.
PostgreSQL version 8.1.4
What am I missing?
Belinda
В списке pgsql-general по дате отправления