Re: date_trunct() and start of week

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: date_trunct() and start of week
Дата
Msg-id bddc86150911261418p6ac5f923ha7a4d94a0a5db649@mail.gmail.com
обсуждение исходный текст
Ответ на date_trunct() and start of week  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
2009/11/26 Thomas Kellerer <spam_eater@gmx.net>
Hi,

while using date_trunc('week', some_date) to get the date of the first day of the week I noticed that it was working as expected: Monday is considered the start of the week.
I assume this depends on some locale setting, but I can't figure out which it is, so I can make sure this is not "accidently" changed. I tried changing LC_TIME (American_America) but that still returned Monday as the first day (my understanding is that in the States Sunday is considered the start of the week)

Any pointers are appreciated (did I miss it in the manual?)

Regards
Thomas


Actually I think I misunderstood your post.  You're looking for the *date* of the first day of the week, not the day.  My bad. :)

Thom 

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: date_trunct() and start of week
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: transparently log a right error