Extract date from week

Поиск
Список
Период
Сортировка
От lucas@presserv.org
Тема Extract date from week
Дата
Msg-id 20051108082511.06n26rf2fc0gk8cg@www.presserv.org
обсуждение исходный текст
Ответ на Re: Extract week from date, start with sunday  ("Robert Blixt" <robert.blixt@transpa.se>)
Ответы Re: Extract date from week  (Jaime Casanova <systemguards@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "Robert Blixt"
Дата:
Сообщение: Re: Extract week from date, start with sunday
Следующее
От: "codeWarrior"
Дата:
Сообщение: Re: Returning rows as columns