Difference between YYYY n RRRR date format
743195Jan 6 2010 — edited Jan 6 2010Hi,
I am not clear with the difference between YYYY n RRRR format in case if we are passing 4 digits input.
As per my understanding:
RRRR accepts a four-digit input (although not required), and
converts two-digit dates as RR does. YYYY accepts 4-digit inputs but doesnt
do any date converting.
But if i do:
select to_date('06-JAN-1940 00:00:00','DD-MON-RRRR HH24:MI:SS') from dual;
or
select to_date('06-JAN-1940 00:00:00','DD-MON-YYYY HH24:MI:SS') from dual;
the output is same which is : 06/01/1940 00:00:00
Why not in RRRR case, it is onverting last 2 digits i.e 40 to 2040(Y2K-compliant format)?
according to me output with RRRR should be 06/01/2040 00:00:00.... Any comments?