| От | A. Kretschmer |
|---|---|
| Тема | Re: converting a specified year and week into a date |
| Дата | |
| Msg-id | 20070214110030.GK1303@a-kretschmer.de обсуждение |
| Ответ на | Re: converting a specified year and week into a date (Alban Hertroys <alban@magproductions.nl>) |
| Список | pgsql-general |
am Wed, dem 14.02.2007, um 11:53:09 +0100 mailte Alban Hertroys folgendes:
> vanessa wrote:
> > hi guys,
> > i was just wondering if it was at all possible to turn a year and a given
> > week number into a real date just using postgresql commands?
> >
> >
> > e.g. if i have year = 2004 and week = 1,
> > can i turn that into say 2004-01-01 (so that the specified
> > date is the one for the beginning of week 1 in the year 2004
> >
> >
> > thanks
> > vanessa :)
>
> I think you're looking for this:
>
> select to_date('01 2004', 'WW YYYY');
> to_date
> ------------
> 2004-01-01
> (1 row)
cool ;-)
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера