| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: get what week a date falls in based on 52 week calendar
On Wed, 13 Jul 2005 20:27:04 +0200, Maxim Demenko <mdemenko_at_gmail.com>
wrote:
>jeffchirco_at_gmail.com wrote:
>> Is there a way to get the week number that a date falls in based on the
>> 52 week calendar? Is there a function or how could I obtain this?
>> Thanks.
>>
>> Jeff
>>
>I assume you mean 53 week calendar ,in that case are you asking about
>format model 'WW' ?
>
>select to_char(sysdate,'WW') from dual;
>
>Best regards
>
>Maxim
IIRC, WW is ANSI, so 52 weeks
and IW is ISO, so 53 weeks.
Before the IW was introduced in version 7 we had to deal with a 53 line long decode over dual to obtain the ISO week number ;)
-- Sybrand Bakker, Senior Oracle DBAReceived on Wed Jul 13 2005 - 15:45:22 CDT
![]() |
![]() |