Re: How can I get the first and last date of a week, based on the week number and the year

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <aklaver(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, Bruno Baguette <bruno(dot)baguette(at)gmail(dot)com>
Subject: Re: How can I get the first and last date of a week, based on the week number and the year
Date: 2008-02-27 06:13:23
Message-ID: 14687.1204092803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <aklaver(at)comcast(dot)net> writes:
> On Tuesday 26 February 2008 8:39 pm, Tom Lane wrote:
>> date_trunc('week', ...) would probably be a more convenient way of doing
>> that.

> I am not sure I follow. The OP has a ISO week number and a year and wants
> dates. I thought date_trunc('field',source) requires a timestamp or interval
> as its source.

Oh, you are right ... I misread the question :-(

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Olmec Sinclair 2008-02-27 06:42:07 Re: Trouble running PostgreSQL server / Server must be started under certain locale.
Previous Message Adrian Klaver 2008-02-27 06:07:56 Re: How can I get the first and last date of a week, based on the week number and the year