Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: get what week a date falls in based on 52 week calendar

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

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Wed, 13 Jul 2005 22:45:22 +0200
Message-ID: <r8vad1tdig6fqg6kcq4kjuliph3teeb26g@4ax.com>


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
Received on Wed Jul 13 2005 - 15:45:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US