query by partial timestamp

Поиск
Список
Период
Сортировка
От Kirk Wythers
Тема query by partial timestamp
Дата
Msg-id E24A44B2-52D8-43A7-9F24-3D56F65AA901@umn.edu
обсуждение исходный текст
Ответы Re: query by partial timestamp  (Raymond O'Donnell <rod@iol.ie>)
Re: query by partial timestamp  (Steve Crawford <scrawford@pinpointresearch.com>)
Re: query by partial timestamp  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
I have a column of type TIMESTAMP, I'd like to query all records from 2011. If it were text I could use a partial such
as:

WHERE
    text ~ '2011'

There must be a simple way to pull the year part out of a timestamp format. Thanks in advance.




В списке pgsql-general по дате отправления:

Предыдущее
От: Todd Kover
Дата:
Сообщение: Discerning when functions had execute revoked from public
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: query by partial timestamp