Extract week from date, start with sunday

Поиск
Список
Период
Сортировка
От Robert Blixt
Тема Extract week from date, start with sunday
Дата
Msg-id 20051107140036.11DC6D6873@svr1.postgresql.org
обсуждение исходный текст
Ответы Re: Extract week from date, start with sunday  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: Extract week from date, start with sunday  (skdangi <skdangi@gmail.com>)
Список pgsql-sql
Hi,


I am currently extracting my weeks from a date like this..

SELECT INTO extractweek EXTRACT( week FROM ldate );

This works fine, except that this assumes (according
to ISO standard) that weeks starts with Monday.

I need the weeks to start with Sunday instead, otherwise
I will not get the correct week.

Is there a workaround for this?

Thanks!


Kind Regards,
Robert




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

Предыдущее
От: Tai Huynh Phuoc
Дата:
Сообщение: Insert large text to text column
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Extract week from date, start with sunday