Setting the Default Date Format : Date « SQL Data Types « Oracle PL/SQL Tutorial






The default date format is specified in the NLS_DATE_FORMAT database parameter.

You can change the setting by setting this parameter's value init.ora or spfile.ora file.

init.ora or spfile.ora file is read when the database is started.

You can set NLS_DATE_FORMAT using an ALTER SYSTEM command.

You can set the NLS_DATE_FORMAT parameter for your own session using SQL*Plus using ALTER SESSION.

A session is started when you connect to a database and is ended when you disconnect.

The following ALTER SESSION statement sets NLS_DATE_FORMAT to MONTH-DD-YYYY.

ALTER SESSION SET NLS_DATE_FORMAT = 'MONTH-DD-YYYY';








10.6.Date
10.6.1.Process and store a specific date and time.
10.6.2.Use the DATE keyword to supply a date literal to the database.
10.6.3.Cast string to date in where clause
10.6.4.Setting the Default Date Format
10.6.5.Storing and Retrieving Dates
10.6.6.Default time field
10.6.7.Combining TO_CHAR() and TO_DATE() Calls
10.6.8.Converting a DATE to Another Language
10.6.9.Compare date type value in where clause
10.6.10.Query for NULL Date type data
10.6.11.TRUNC(Start_date)
10.6.12.TO_CHAR(start_date, 'MM-DD-YYYY HH24:MI')
10.6.13.Call SYSDATE in insert statement
10.6.14.Check Date format before inserting
10.6.15.Add condition constraint to date type column
10.6.16.Greater than a date
10.6.17.BETWEEN for date type value
10.6.18.Date calculation