Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Info on RR date format

Re: Info on RR date format

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 31 Aug 1998 10:38:26 GMT
Message-ID: <35fe7b8f.24707126@192.86.155.100>


A copy of this was sent to mbrennan_at_westgate.co.nz (Mark Brennan) (if that email address didn't require changing) On Mon, 31 Aug 1998 18:10:14 GMT, you wrote:

>I am looking for information on the RR date format . I have searched
>thru Oracle's sites to no avail. They do mention technical bulletins
>regarding RR but they can't be found by doing searchs.
>

see the server language reference manual, chapter 3, on the section with date formats. it tells you all about RR (however, your question really isn't about RR, its about "how do I set the NLS_DATE_FORMAT correctly in the init.ora file")

>We are currently using a 7.1.6 RDBMS.
>
>When we set the rr date at database level then any query on date
>say select * from table the date comes back with single quotes eg
>'25-AUG-98' . When set only at session level this doesn't happen.
>

you probably have:

nls_date_format = 'DD-MON-RR'

in your init.ora. It should be

nls_date_format = "DD-MON-RR"

when you set the nls_date_format in the init.ora to be 'DD-MON-RR', the single quotes become part of the date format -- for example:

SVRMGR> show parameter nls_date

NAME                                TYPE    VALUE
----------------------------------- ------- ------------------------------
nls_date_format                     string  'DD-Mon-RR'                   

SVRMGR> select sysdate from dual;
SYSDATE



'31-Aug-98'

If, on the other hand, you use "DD-MON-RR" you will get:

SVRMGR> show parameter nls_date

NAME                                TYPE    VALUE
----------------------------------- ------- ------------------------------
nls_date_format                     string  DD-Mon-RR                     

SVRMGR> select sysdate from dual;
SYSDATE



31-Aug-98
1 row selected.

the single quotes are CORRECT in a SQL statement (but not in the initialization file), for example:

SVRMGR> alter session set nls_date_format = 'dd-mon-yyyy hh24:mi:ss'; Statement processed.
SVRMGR> select sysdate from dual;
SYSDATE



31-aug-1998 06:16:02 1 row selected.

SVRMGR>
>I am looking for info so we can work on making our Forms2.3
>applications y2k compliant.

there will be other issues here -- its not as simple as setting RR in the database. many date conversions take place in the form, on the client, without going to the database. Setting RR at the database level won't do it unless all of you date fields in the form are actually character strings and you don't use any date variables in the form at all.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Aug 31 1998 - 05:38:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US