Oracle Database - NLS_DATE_LANGUAGE

> Database > Oracle Database

1 - About

NLS_DATE_LANGUAGE is a parameter which control the language used in the date format datatype and that you can use to control the implicit datatype conversion

Advertising

3 - Example

SQL> ALTER session SET NLS_DATE_LANGUAGE = "AMERICAN";
 
Sessie IS gewijzigd.
 
SQL> SELECT TO_DATE('01-OCT-2010','DD-MON-YYYY') FROM dual;
 
TO_DATE(
--------
01-10-10
 
SQL> ALTER session SET NLS_DATE_LANGUAGE = "DUTCH";
 
Sessie IS gewijzigd.
 
SQL> SELECT TO_DATE('01-OCT-2010','DD-MON-YYYY') FROM dual;
SELECT TO_DATE('01-OCT-2010','DD-MON-YYYY') FROM dual
               *
FOUT IN regel 1:
.ORA-01843: Geen geldige maand.
 
 
SQL> SELECT TO_DATE('01-OKT-2010','DD-MON-YYYY') FROM dual;
 
TO_DATE(
--------
01-10-10