0

When I run select to_char(SYSDATE-3) from dual from SQL DEVELOPER it gives 26-06-15. But when I run the same query from SQLPLUS session from Linux its giving -

SQL> select TO_CHAR(SYSDATE-3) from dual;

TO_CHAR(SYSDATE-3)
------------------
26-JUN-15

How to correct this in SQLPLUS?

arco444
  • 22,002
  • 12
  • 63
  • 67

1 Answers1

0

This is the same value in different format.

You can set the session level date format using

alter session set nls_date_format='dd-mm-yy';

Or you can pass this format in the to_char function

select TO_CHAR(SYSDATE-3, 'dd-mm-yy') from dual;