Previous |
Next |
Specifies: Language for names and abbreviations of days and months that are produced by:
SQL functions TO_CHAR
and TO_DATE
(which are introduced in "Using Conversion Functions in Queries")
Default date format (set by NLS_DATE_FORMAT
, described in "About the NLS_DATE_FORMAT Parameter")
Symbols for default-language equivalents of AM, PM, AD, and BC
Acceptable Values: Any language name that Oracle supports. For a list, see Oracle Database Globalization Support Guide.
Default Value: Set by NLS_LANGUAGE
, described in "About the NLS_LANGUAGE Parameter".
The following example shows how setting NLS_DATE_LANGUAGE
to FRENCH
and SWEDISH
affects the displayed system date.
To try this example in SQL Developer, enter the statements and queries in the SQL Worksheet. For information about the SQL Worksheet, see "Running Queries in SQL Developer". The results shown here are from SQL*Plus; their format is slightly different in SQL Developer.
NLS_DATE_LANGUAGE Affects Displayed SYSDATE
Note the current value of NLS_DATE_LANGUAGE
.
For instructions, see "Viewing NLS Parameter Values".
If the value of NLS_DATE_LANGUAGE
in step 1 is not FRENCH
, change it:
ALTER SESSION SET NLS_DATE_LANGUAGE=FRENCH;
Run this query:
SELECT TO_CHAR(SYSDATE, 'Day:Dd Month yyyy') "System Date" FROM DUAL;
Result:
System Date -------------------------- Mercredi:01 Octobre 2008
Change the value of NLS_DATE_LANGUAGE
to SWEDISH
:
ALTER SESSION SET NLS_DATE_LANGUAGE=SWEDISH;
Repeat the query from step 3.
Result:
System Date ------------------------- Onsdag :01 Oktober 2008
Set NLS_DATE_LANGUAGE
to the value that it had at step 1.
Oracle Database Globalization Support Guide
Oracle Database SQL Language Reference for more information about the TO_CHAR
function
Oracle Database SQL Language Reference for more information about the TO_DATE
function