Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can Oracle 7.x store 4-digit year dates?
Erwan Layman <erwan_at_contact.com.sg> wrote:
>Marc Scheuner wrote:
>
>> Oracle always stores dates internally as numerical values, if you only
>>
>> see two digits for the year, that's simply a setting of preference for
>>
>> your session.
>>
>> Check out the ALTER SESSION SET NLS_DATE_FORMAT command. You can set
>> any kind of date display you would like to have with it.
>
>Hello,
>
>Your suggestion to use ALTER SESSION works great. But I lose this
>setting when I logout of SQL*Plus. How do I make this new date format
>setting persistent for myself and for all users of my database? I have
>DBA privilege. Thanks in advance.
>
>
>Erwan Layman
>
>
If using Win95, go Start->Run->regedit, then
HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE go File->New->Key NLS_DATE_FORMAT
then use DD-MMM-RRRR. This will give you a window from 1950 to 2049.
DON'T put this on your server or the DBA's session as it can conflict
with Oracle's supplied scripts. Once on your PC ALL sessions will use
it.
DO NOT USE 'RRRR' FOR OUTPUT FORMATS inside your pl/sql or forms as it can give false displays.
David
_--_|\ PO Box 139, Belair, South Australia, 5052 / \ Tel:+61 3 5173-2273 Fax:+61 3 5173-2991 \_.-*._/ email: djmartin_at_netspace.net.au (Work things) ^ v : davidj_at_adam.com.au (Adelaide stuff) | "Don't fight the decision, fight its basis!"'----<---<---<---<---<---<---<---<---<---<---<---<---<---<- Received on Mon Aug 11 1997 - 00:00:00 CDT