Re: ISO weeknumbers

From: sybrandb <sybrandb_at_gmail.com>
Date: Tue, 6 Jan 2009 01:13:54 -0800 (PST)
Message-ID: <34140159-142d-4aca-85ca-cb55b4bd07b6_at_i20g2000prf.googlegroups.com>



On 5 jan, 21:41, "Terry Dykstra" <tddyks..._at_forestoil.ca> wrote:
> The IW format string returns the ISO week number
>
> IW
>  No
>      Week of year (1-52 or 1-53) based on the ISO standard.
>
> I'm confused by this.  When would you get week 53?  For example, when
> running this against the last week of 2008 (using 9.2.0.7 SE) , it switches
> from week 52 to week 1 while still in December.
>
> select to_char(to_date('20081228','yyyymmdd') ,'IW') from dual;> 52
>
> select to_char(to_date('20081229','yyyymmdd') ,'IW') from dual;
>
> > 01
>
> --
> Terry Dykstra

Week 53 occurs about once in 4 years.
This is why in the past have been hunting for a bug for 4 years. The bug only occurred in week 53, as the application could only handle 52-week years.

--
Sybrand Bakker
Senior Oracle DBA
Received on Tue Jan 06 2009 - 03:13:54 CST

Original text of this message