If you use the TO_DATE function with the YY date format element, the
date value returned is always in the current century. If you use the RR
date format element instead, the century of the return value varies
according to the specified two-digit year and the last two digits of the
current year. the behavior of the RR date format element.
Example 1
Assume these queries are issued between 1950 and 1999:
SELECT TO_CHAR(TO_DATE('27-OCT-95', 'DD-MON-RR') ,'YYYY') "Year"
FROM DUAL;
Year
----
1995
SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "Year";
FROM DUAL;
Year
----
2017
Example 2
Assume these queries are issued between 2000 and 2049:
SELECT TO_CHAR(TO_DATE('27-OCT-95', 'DD-MON-RR') ,'YYYY') "Year";
FROM DUAL;
Year
----
1995
SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "Year";
FROM DUAL;
Year
----
2017
Regards,
Dinesh
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]