Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Technical Bulletin - Help!
On Sat, 20 Sep 1997 04:21:29 -0600, ramjees_at_hotmail.com wrote:
>Hi:
>
>Would someone please help me or Srini( raosrini_at_hotmail.com )
>to get hold of Oracle Technical Bulletin Ref: 104296.626.
>
>The Oracle site / support desk is of little help and the doc
>just doesn't seem to be available anywhere else...
>
>Thanks in advance.
>
>Ramjee.
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Here you go. Frankly there is more/better information on this in the SQL Language Reference manual. this begins on page 3-67 of the 7.3 doc Oracle7 Server SQL Reference.
Document ID: 104296.626 Title: Century Date Format under Oracle7 Creation Date: 1 October 1992 Last Revision Date: 16 November 1993 Revision Number: 1 Category: ORACLE 7 Product: GENERIC Product Version: ORACLE 7 Platform: GENERIC Information Type: ADVISORY Impact: MEDIUM Abstract: This article describes the use of a new date format provided with Oracle7. This format, RR, allows the application programmer to override the default century of '19'. Keywords: SQL;PLUS;DATE;CENTURY;FORMAT;O7;YEAR;DEFAULT
Oracle7 provides for the turn of the century with a new date format called RR. The RR date format element is very similar to the YY date format element except in that it stores date values of other centuries by making assumptions about the intended date based on the last two digits of the date format. The following describes the date returned by the RR format, based on the current year and the year specified by the user:
RR Date Format Current Year Two Digit Year Year RR Format Last Two Digits Specified Returns --------------- -------------- ---------------- 0-49 0-49 Current Century 50-99 0-49 One Century after current 0-49 50-99 One Century before current 50-99 50-99 Current Century
For example, since the current year is 1993, dates entered between 50 and 99 will be assumed to be within the 20th century, and dates entered between 0 and 49 will be assumed to be within the 21st century. When operating in the year 2001, the same rules apply; dates entered between 50 and 99 will be assumed to be within the 20th century, and dates entered between 0 and 49 will be assumed to be within the 21st century.
Here is an example of the RR usage:
SQL> INSERT INTO emp (empno, deptno,hiredate) VALUES 2 (9999, 20, TO_DATE('01-jan-03', 'DD-MON-RR'));
1 row created.
SQL> INSERT INTO emp (empno, deptno,hiredate) VALUES 2 (8888, 20, TO_DATE('01-jan-67', 'DD-MON-RR'));
1 row created.
SQL> SELECT empno, deptno,
2 TO_CHAR(hiredate, 'DD-MON-YYYY') hiredate 3 FROM emp; EMPNO DEPTNO HIREDATE ---------- ---------- ----------- 8888 20 01-JAN-1967 9999 20 01-JAN-2003 ----------------------------------------------------------------------
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |