Home / Installation/Configurations10g / Change Date and Time Formats In Oracle Database?

Change Date and Time Formats In Oracle Database?

Change Date and Time Formats In Oracle Database?

Option 1. If We want to change this format to DD/MONTH/YYYY format.

SQL> alter session set nls_date_format=’DD/MONTH/YYYY’;

Session altered.

SQL> select sysdate from dual;

SYSDATE

—————–

20/OCTOBER  /2017

 

Option 2. If we want get the both date and time

SQL> alter session set nls_date_format=’DD/MONTH/YYYY HH24:MI:SS’;

Session altered.

SQL> select sysdate from dual;

SYSDATE

————————–

20/OCTOBER  /2017 17:19:12 –It is 24 hours format.

 

SQL> alter session set nls_date_format=’DD/MONTH/YYYY HH:MI:SS’;

Session altered.

SQL> select sysdate from dual;

SYSDATE

————————–

20/OCTOBER  /2017 05:19:43  –It is 12 hours format.

 

 

About Syed Saad Ali

With 13 years of experience as a certified and skilled Oracle Database Administrator, I possess the expertise to handle various levels of database maintenance tasks and proficiently perform Oracle updates. Throughout my career, I have honed my analytical abilities, enabling me to swiftly diagnose and resolve issues as they arise. I excel in planning and executing special projects within time-sensitive environments, showcasing exceptional organizational and time management skills. My extensive knowledge encompasses directing, coordinating, and exercising authoritative control over all aspects of planning, organization, and successful project completions. Additionally, I have a strong aptitude for resolving customer relations matters by prioritizing understanding and effective communication. I am adept at interacting with customers, vendors, and management, ensuring seamless communication and fostering positive relationships.

Check Also

OracleDBconfig

Manually remove ODA DB HOME

Manually remove OLD DB HOMES if odacli-delete dbhome fails Please follow the instructions below: 1. …

Leave a Reply