You can try:
Input: select to_date (' 05/04/2017 ', 'dd/MM/yy) from dual;
Output: 2017/4/5
CodePudding user response:
The problem is the client display format, for the date type 2017/4/5 and 4/5/2017 results are the sameCodePudding user response:
Nls_date_formatChange this,
CodePudding user response:
Oracle data display form of the default time format data, related to the character set used by general display (date) (month) (year),You can modify the method of Oracle date format:
Modify the current session in the SQL * plus date format;
SQL> Alter session set nls_date_format='yyyy - mm - dd hh24: mi: ss';
Amend the current session time format for this format: 2003-01-28 15:23:38, namely SiWei years on - two - two, Spaces, 24 hours of hours: minutes: seconds, this modified method, applies only to the current session,