i want to convert the date format . The default date format in oracle is dd-mon-yy. I want that my default date format should be dd-mon-yyyy. I tried changing initorcl.ora . But it does not work.
e.g:-whenever i write "select sysdate from dual". The date format is dd-mon-yy. I want that this date format should be dd-mon-yyyy.
thankx in advance.
When the going gets tough, the tough gets going
set nls_date_format ='DD-MON-YYYY'
to your session
change in ur login.sql file
and set date format as dd-mon-yyyy
Although setting the nls_date_format parameter will sort out your immediate problem, it is dangerous to rely on default date formats like that (if a session runs the code without having the date format set, the code breaks - and, of course, there are portability issues). It is better to explicitly set the date format whenever the date is used by using the to_char(sysdate, 'dd-mon-yyyy') function.
I was able to set the NLS_DATE_FORMAT ON NT successfully to-day thus which successfully returns date format in 2001 whenever we type 001.
Do it this way:
1.Open your WINNT Server My Computer Property settings and go to Environment Settings.There type NLS_DATE_FORMAT and in the value type DD-MON-YYYY.
2.Next, on your Client NT machines,do the same environment settings .
3.After that Log in to sql*plus,and then type:
select sysdate from dual;
Hope this helps!
Let me know after you've finished up with this config successfully!
BTW:any idea how to set up NLS_DATE_FORMAT DD-MON-YYYY on WIN98 platforms!
Click Here to Expand Forum to Full Width