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

Home -> Community -> Usenet -> c.d.o.server -> Re: ISO Dates

Re: ISO Dates

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1998/02/04
Message-ID: <34d8e1d0.29733540@www.sigov.si>#1/1

On Wed, 4 Feb 1998 11:24:11 -0800, "Murali Kazhipurath" <murali_at_jps.net> wrote:

>Can some one tell me what is the difference between a regular calendar date
>and an ISO date?

The difference is only in definition of the number of a week inside a year for a particular date. Acording to ISO standard, if the 01-JAN falls on a Friday, Saturday, or Sunday, then it is considered to be a day of the 53rd week of previous year, while normaly it is considered allway to be a first day of the first week of current year.

Consider the 01-JAN-1999, which fally on Friday:

SQL> select to_char(to_date('01-JAN-99'),'day') from dual;

TO_CHAR(TO_DATE('01-JAN-99'),'DAY')



friday

SQL> select to_char(to_date('01-JAN-99'),'ww yyyy') from dual;

TO_CHAR(TO_DATE('01-JAN-99'),'WWYYYY')



01 1999 <-- "normal" format mask applied (WW YYYY)

SQL> select to_char(to_date('01-JAN-99'),'iw iyyy') from dual;

TO_CHAR(TO_DATE('01-JAN-99'),'IWIYYY')



53 1998 <-- ISO format mask applied (IW IYYY)

In other words, acording to ISO, for week numbering a week always starts on monday, while in non_ISO a week always starts on a day of the week that 01-JAN falls into when applying to week numbering.

>Thanks,
>
>Murali

Regards,


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Wed Feb 04 1998 - 00:00:00 CST

Original text of this message

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