I want to get the right week number.
Using the to_char
function, the function enumerate the week starting with mondey, but i want to get the week number considering that a week start on saturday.
Here is an example:
SELECT to_char('05-01-2013'::date,'daydd-mm-yyyy') as date_char, to_char('05-01-2013'::date,'IW') as week_number
Result:
"saturday 05-01-2013";"01"
And should be:
"saturday 05-01-2013";"02"
Is there any way to get it?
Config info: Postgresql 9.2 under Windows 7