The RR Date Format Element
The RR date format element is same to the YY date format element but it gives further flexibility for storing date values of other centuries. The RR date format element permits you to store twenty-first century dates in the twentieth century through specifying only the last two digits of the year. That also stores the twentieth century dates in the twenty-first century in the similar way if necessary.
If TO_DATE function is used with the YY date format element and the date value returned is always in the current century. Alternative if RR date format element is used then the century of the return value varies according to the specified two-digit year and the last two digits of the current year.
The following instance of demonstrates the behavior of the RR date format element.
Example
SELECT TO_CHAR(TO_DATE('27-OCT-95', 'DD-MON-RR') ,'YYYY') "4-digit year" FROM DUAL
4-digit year
------------
1995
SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "4-digit year" FROM DUAL
4-digit year
------------
2017
Note: If the year is among 0 to 49 its places them in the current century.