From: Kumar <sgnerd@yahoo.com.sg>
To: psql <pgsql-sql@postgresql.org>
Subject: Getting the week of a date
Date: Mon, 16 Feb 2004 17:40:08 +0530
Message-ID: <00f701c3f485$d7091430$7502a8c0@hdsc.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sgnerd@yahoo.com.sg
Subject: Re: Getting the week of a date
In-Reply-To: <00f701c3f485$d7091430$7502a8c0@hdsc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox