Home > database >  Oralce a question of time
Oralce a question of time

Time:09-24

Oracle runs in string format, why to Date type into (Date) (month) (year)?
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 same

CodePudding user response:

Nls_date_format

Change 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,
  • Related