year and weeknumbers (proposal included)

Поиск
Список
Период
Сортировка
От joost@snow.nl
Тема year and weeknumbers (proposal included)
Дата
Msg-id 200301301526.PAA04362@neerijnen.snow.nl
обсуждение исходный текст
Ответы Re: year and weeknumbers (proposal included)  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-bugs
hi,

last year (2002) the date december 31st is in week 1 of 2003.

it is not possible to get this out of a date-column using EXTRACT or
to_char.
         to_char( '2002-12-31', 'WW' ) returns 1, and
         to_char( '2002-12-31', 'YYYY' ) returns 2002 (as expected)!

the format for retrieving the year with respect to week-numbering
could be something like IY, IYY, IYYY, IYYYY.

         to_char( '2002-12-31', 'IYYYY' ) returns 2003.

regards,

Joost Helberg
--
Joost Helberg
Technisch Directeur Snow BV http://snow.nl Tel 0418-653333 Fax 0418-653666
Voorzitter VOSN         http://www.vosn.nl Tel 0418-653336 Fax 0418-653666
GPG PblKey fprnt= 738C 20AC A545 02AE 6F5D  5A9F D724 EB4B 2B10 150B

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Jose Manuel"
Дата:
Сообщение: Windows Ports
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: year and weeknumbers (proposal included)