Home > database >  Oracle varchar2 type of time into a format of the time
Oracle varchar2 type of time into a format of the time

Time:10-10

The Oracle database storage time is a varchar2 format storage time
The 2020-04
Such varchar2 format how to convert yyyy - MM time format

CodePudding user response:

To_date (' 2020-04 ', 'YYYY - MM)

CodePudding user response:

The
reference XuanXiao 1/f, 86 response:
to_date (' 2020-04, 'YYYY - MM)


This I tried to find out, the date is a manual entry of the varchar type fields ym a query error, said year should be between 4713 and + 9999 and cannot be 0

CodePudding user response:

reference time, the second floor was buried dreams response:
Quote: reference XuanXiao 1/f, 86 response:

To_date (' 2020-04 ', 'YYYY - MM)


This I tried to find out, the date is a manual entry of the varchar type fields ym a query error, say the year should be between 4713 and + 9999 and cannot be 0

Show a bit of a date format is not standard, not all conversion, such as some date input into '98-01' that do not conform to the requirements of the format
  • Related