Re: get what week a date falls in based on 52 week calendar

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Thu, 14 Jul 2005 00:03:18 +0200
Message-ID: <db432g$5i4$05$1_at_news.t-online.com>


Sybrand Bakker wrote:
> 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 DBA

I didn't had in mind ISO by answering, so spontaneously typed 53 ;-) But regarding the format modifiers, 'WW' means 53, 'IW' may vary (according ISO 8601) 52 or 53 resp.

Best regards

Maxim Received on Thu Jul 14 2005 - 00:03:18 CEST

Original text of this message