1. Introduction
In this article, we will discuss about the default date format in Oracle, How to change it with examples.
2. Default Date Format in Oracle
Default date format of Oracle database is DD-MON-RR where RR refers to a two digit year.
4. Conclusion
To summarize, we have seen the details about the default date format in Oracle, how to change the default date format.
How to change the default date format in Oracle? (Session Level)
ALTER SESSION SET nls_date_format = ‘DD/MM/YYYY’;
How to View Current Date Format in Oracle?
SELECT * FROM nls_session_parameters where paramter = ‘NLS_DATE_FORMAT’;
How to get Current Date of System in Oracle?
Select SYSDATE from dual;
How to change the default date format in Oracle? (System Level)
ALTER SYSTEM SET nls_date_format =’DD/MM/YYYY’ scope=both;
How to insert date values into table oracle?
INSERT INTO tablename(Date_Column_name) VALUES(TO_DATE(’17/12/2020′, ‘DD/MM/YYYY’));