Getting the week of a date - Mailing list pgsql-sql

From Kumar
Subject Getting the week of a date
Date
Msg-id 00f701c3f485$d7091430$7502a8c0@hdsc.com
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: "Denis"
Date:
Subject: Re: max timestamp
Next
From: Robert Creager
Date:
Subject: Re: Getting the week of a date