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

Home -> Community -> Usenet -> c.d.o.tools -> Re: NLS_DATE_FORMAT

Re: NLS_DATE_FORMAT

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1999/06/23
Message-ID: <37711f41.3121568@newshost.us.oracle.com>#1/1

A copy of this was sent to Marc Mazerolle <informaze_at_sympatico.ca> (if that email address didn't require changing) On Wed, 23 Jun 1999 16:44:45 GMT, you wrote:

>Hi all,
>
>What is the syntax to set the NLS_DATE_FORMAT to "DD-MON-RR" in the
>init.ora. file ? I know there is a specific syntax to follow....
>
>Regards,
>
>Marc Mazerolle

It would look like:

nls_date_format = "DD-Mon-RR"

but bear in mind.... If the client sets the NLS_* parameters -- they override the server in all cases. In fact, if the client sets the NLS_LANG parameter -- that causes all NLS_* settings on the server to be ignored and the defaults for that NLS_LANG specified on the client on used.

Where that comes into play is typically if the client is windows and the server is unix. The client install on windows set the NLS_LANG parameter in the registry by default. This setting is different from the default you find for unix. Any NLS_* settings you put in the init.ora will *not* be used by those clients.

You have to set the NLS_DATE_FORMAT in the registry on the client

or

you need to put an "alter session set nls_date_format='yyyymmdd'" in your apps right after the connect

or

with Oracle8i, release 8.1 you can code:

create or replace trigger data_logon_trigger after logon
ON DATABASE
begin

    execute immediate

        'alter session set nls_date_format = ''yyyymmdd'' '; end;
/

as well.

-- 
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Wed Jun 23 1999 - 00:00:00 CDT

Original text of this message

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