Extract week from date, start with sunday - Mailing list pgsql-sql

From Robert Blixt
Subject Extract week from date, start with sunday
Date
Msg-id 20051107140036.11DC6D6873@svr1.postgresql.org
Whole thread Raw
Responses Re: Extract week from date, start with sunday
Re: Extract week from date, start with sunday
List 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 by date:

Previous
From: Tai Huynh Phuoc
Date:
Subject: Insert large text to text column
Next
From: "A. Kretschmer"
Date:
Subject: Re: Extract week from date, start with sunday