Re: Wildcard in date field

Поиск
Список
Период
Сортировка
От K Parker
Тема Re: Wildcard in date field
Дата
Msg-id CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com
обсуждение исходный текст
Список pgsql-sql
The suggest solution works:

>  SELECT  * FROM my_table WHERE
>  date_part('month', col_name::datetime) = '06' 
>  AND date_part('year', col_name::datetime) =
>  '2000';

But you can also just do a comparison:
 where col_name >= '2000-06-01' AND col_name <= '2000-06-30'

Using the correct date format for your environment, of course.



Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] query failed , don't know why
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: More full text index..