Date searching by month & day only

Поиск
Список
Период
Сортировка
От Chris Campbell
Тема Date searching by month & day only
Дата
Msg-id 453A24085F801842AEA8D0B6B269065D020B2D9099FC@HDMC.cds.local
обсуждение исходный текст
Ответы Re: Date searching by month & day only  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-novice

Hello List,

 

I’m attempting to pull up a birthday list of anyone born between, let’s say June 15 and June 30th.  The year is irrelevant.  

 

I’m wondering if there is a more elegant way to do this than using something like:

 

SELECT key, dob from ds1.contact

WHERE

extract(month FROM contact.dob ) = 6

and extract(day FROM contact.dob) >= 15

and extract(day FROM contact.dob) <= 30

 

Thanks for any suggestions…

 

Regards,

 

Chris Campbell

Cascasde Data Solutions Inc.

800.280.2090

ccampbell@cascadeds.com

 

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

Предыдущее
От: Andrej
Дата:
Сообщение: Re: Updating RHEL4 system for PHP; requires Postgresql updates
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: Date searching by month & day only