Set default date format in Oracle SQL*Plus

February 17th, 2009 Posted in Oracle How-To

I find myself dealing with dates all the time in Oracle. I dislike Oracle’s default date format. I generally want to see dates with time and usually down to the second. To change the default date format you need to modify your NLS_DATE_FORMAT. Here is how you do it:

alter session set NLS_DATE_FORMAT=’PUT FORMAT HERE’;

For example

alter session set NLS_DATE_FORMAT=’yyyy/mm/dd hh24:mi:ss’;
Tags: , ,

Leave a Reply