| От | Magne Mæhre |
|---|---|
| Тема | Re: BUG #3892: Invalid week determination |
| Дата | |
| Msg-id | 479492B7.1020503@sun.com обсуждение исходный текст |
| Ответ на | BUG #3892: Invalid week determination ("Roman" <rk@infren.com>) |
| Список | pgsql-bugs |
Roman wrote:>> I see in the doc: ( however it does not explain the case )>> week> The number of the week of the year thatthe day is in. By definition (ISO> 8601), the first week of a year contains January 4 of that year. (The> ISO-8601 weekstarts on Monday.) In other words, the first Thursday of a> year is in week 1 of that year. (for timestamp values only)> It's actually in the doc for the to_char() function. 'WW' uses a week definition where January 1st is in week 1. If you use 'IW', you get the ISO definition. => select to_char(now(),'yyyyIW'); to_char --------- 200804 (1 row) => select extract(week from now()); date_part ----------- 4 --Magne
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера