| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> NLS_DATE_FORMAT for Y2K
Thanks much for any help you may provide.
I am running oracle 7.3.x.x and have set the nls_date_format to dd-mon-rr.
Here's the proof:
> select substr(name,1,20), substr(value,1,20)
from sys.v_$parameter where name like '%nls_date%'
nls_date_format 2 DD-MON-RR
I have created a 1 row, 1 column table:
> desc test_y2k
col1 date
Here is all that is in the table:
> select col1 from test_y2k;
05-JAN-11
The "RR" is not acting as expected when I perform the following query. I
thought I would get 2011
and not 1911.
>select DECODE(to_char(col1 , 'YYYY-MON-DD'),
'2011-JAN-05' , '2011',
'1911-JAN-05' , '1911',
'OTHER' )
from test_y2k ;
I get:
1911
I get this even if I put RRRR instead of YYYY I get 1911. What's wrong!
Thanks Again,
Frank S.
New Hampshire
Received on Fri Jul 02 1999 - 14:46:35 CDT
![]() |
![]() |