Extract date from week - Mailing list pgsql-sql

From lucas@presserv.org
Subject Extract date from week
Date
Msg-id 20051108082511.06n26rf2fc0gk8cg@www.presserv.org
Whole thread Raw
In response to Re: Extract week from date, start with sunday  ("Robert Blixt" <robert.blixt@transpa.se>)
Responses Re: Extract date from week
List pgsql-sql
Hi
Looking the e-mail I remembered a question.
I saw that "select extract (week from now()::date)" will return the 
week number
of current year. But, how can I convert a week to the first reference 
date. Ex:
select extract(week from '20050105'::date);  -- 5 Jan 2005
--Returns--
date_part |
1         |

It is the first week of year (2005), and how can I get what is the first date
references the week 1? Ex:
select ???? week 1
--should return---
date     |
20050103 |     -- 3 Jan 2005

Thank you.
Lucas Vendramin



pgsql-sql by date:

Previous
From: "Robert Blixt"
Date:
Subject: Re: Extract week from date, start with sunday
Next
From: "codeWarrior"
Date:
Subject: Re: Returning rows as columns