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

Home -> Community -> Usenet -> c.d.o.misc -> Re: To_char ('IW') format element

Re: To_char ('IW') format element

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 19 Jan 2005 17:04:39 -0800
Message-ID: <41ef039c$1_2@127.0.0.1>


Randy Harris wrote:

> "Randy Harris" <randy_at_SpamFree.com> wrote in message
> news:LWBHd.11135$Vj3.736_at_newssvr17.news.prodigy.com...
>

>>I'm looking for clarification of the 'IW' format element.  The docs say it
>>is based on the ISO standard, but I haven't been able to find further
>>information.  It's rather obvious if Jan falls on a Monday, week 1 begins
>>the same day.  But, what if Jan 1 falls on a Tuesday?  Does week 1 begin
>>that day, or the following Monday?

>
>
> I'm finding it tough to figure this out by trial and error. It is looking
> as though week 1 always begins on Jan 1 and week 2 begins the following
> Monday - except - if Jan 1 is a Friday, Saturday or Sunday, then week 1
> doesn't begin until the following Monday and week 2 begins on the second
> Monday.
>
> Can anyone confirm that this is correct?

With ISO there can be a 53rd week in a year.

SELECT TO_CHAR(sysdate-19, 'IW') FROM dual;

written on the 19th of January, 2005.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Jan 19 2005 - 19:04:39 CST

Original text of this message

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