Getting the week of a date

Поиск
Список
Период
Сортировка
От Kumar
Тема Getting the week of a date
Дата
Msg-id 00f701c3f485$d7091430$7502a8c0@hdsc.com
обсуждение исходный текст
Ответы Re: Getting the week of a date  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Re: Getting the week of a date  (Richard Huxton <dev@archonet.com>)
Re: Getting the week of a date  (sad <sad@bankir.ru>)
Список pgsql-sql
Dear Friends,
 
Postgres 7.3.4 on RH Linux7.2.
 
While this works for month and why not for week

test=# select date_trunc('month',current_date + ('5 month')::INTERVAL);
     date_trunc
---------------------
 2004-07-01 00:00:00
(1 row)
 
test=# select date_trunc('week',current_date + ('5 month')::INTERVAL);
ERROR:  TIMESTAMP units 'week' not supported
test=#
 
Any idea on how to find the 3 rd Wednesday of any given month.
 
Thanks
Kumar
 

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

Предыдущее
От: "Denis"
Дата:
Сообщение: Re: max timestamp
Следующее
От: Robert Creager
Дата:
Сообщение: Re: Getting the week of a date