Xref: alice comp.databases.oracle.server:25745
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!news.idt.net!newsfeed.internetmci.com!207.217.77.43!newsfeed1.earthlink.net!nntp.earthlink.net!not-for-mail
From: BH <bhom@sprintmail.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: NLS_DATE_FORMAT on NT client
Date: Wed, 29 Jul 1998 11:13:18 -0700
Organization: EarthLink Network, Inc.
Lines: 71
Message-ID: <35BF663D.32C2702E@sprintmail.com>
References: <EwtF18.A2H@news.arco.com>
Reply-To: bhom@sprintmail.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.04 [en] (Win95; U)
To: "C. Mason" <cmason@aai.arco.com>

You can set it for session:

    alter session set NLS_DATE_FORMAT = <value>

or

to change it permanently on the client:

1) The NLS_DATE_FORMAT parameter needs to be added to database initialization
file (for example, initorcl.ora for default instance ORCL):

       NLS_DATE_FORMAT="MM/DD/YYYY"  -- or whatever date format you need

2) Also, this parameter needs to be changed from the registry:

   - run regedt32

   - select HKEY_LOCAL_MACHINE
         Software
             ORACLE

   - select 'Edit' from menu
   - select 'Add Value...' from submenu

        Value Name = NLS_DATE_FORMAT
        Data Type = REG_EXPAND_SZ or REG_SZ
        String = MM/DD/YYYY (or whatever date format that you need -- no
                             quotes are necessary)

3) To change NLS_DATE_FORMAT for a 16-bit application on the server, the value
must be entered in the server's ORACLE.INI:

       NLS_DATE_FORMAT=MM/DD/YYYY

4) You must then stop the database and services, and restart.

5) NLS_DATE_FORMAT needs to be set on any client which has NLS_LANG set (for
example, all Windows, Windows NT, Windows 95, and OS/2 clients), because there
is a default NLS_DATE_FORMAT implied for any NLS_LANG.

For 16-bit client applications on Windows, Windows NT, and Windows 95, the
parameter needs to be set in ORACLE.INI.  For 32-bit applications on Windows
95, the parameter needs to be set in the registry:

   - run regedit.exe

   - select HKEY_LOCAL_MACHINE
         Software
             ORACLE

   - select 'Edit' from menu
   - select 'New' from submenu
   - select 'String Value' from submenu

        Value Name = NLS_DATE_FORMAT
              Data = MM/DD/YYYY (or whatever date format that you need -- no
                             quotes are necessary)

For 32-bit applications on Windows NT clients, the parameter is set as in
step 2, above.

C. Mason wrote:

> I am using SQLPLUS on an NT machine to connect  to an ORACLE database on a
> UNIX server.  The NLS_DATE_FORMAT in my SQLPLUS session is different that
> the NLS_DATE_FORMAT that is set in the initsid.ora file on the server.
> Where do I set the default NLS_DATE_FORMAT on my NT client so that it is the
> same as what is set on the server?



