I am using extract to retrieve the week of a certain date as follows..

SELECT INTO extractweek EXTRACT( week FROM NEW.startdate );
However, doing it this way does not suit my purposes since the
standard week starts with Monday. My weeks must start with
Sunday instead, and therefor it gives me the wrong week number.

Is there a good solution on how to change this so that a week starts
with Sunday instead of Monday?