The result reported that the ORA-01810 format code had two errors. After the web query, it was found that there is a problem with the formatting string, which should not be repeat a format twice, otherwise Oracle
The result reported that the ORA-01810 format code had two errors. After the web query, it was found that there is a problem with the formatting string, which should not be repeat a format twice, otherwise Oracle
You must use the TO_DATE function.
SQL code
TO_DATE ('2017-08-24 00:00:00 ', 'yyyy-MM-DD HH: mm: ss ')
The results reported two errors in the ORA-01810 format code. after an online query, it was found that there was a problem with formatting the string. The format should not be repeated twice. Otherwise, Oracle would not know which placeholder range to parse the field, the correct format should be like this. MI is used to represent minutes, instead of ss in java.
SQL code
TO_CHAR ('2017-08-15 00:00:00 ', 'yyyy-MM-DD HH: MI: ss ')
Later, we found that for the 24-hour system, HH was not supported well and changed to the following format:
SQL code
TO_CHAR ('2017-08-15 00:00:00 ', 'yyyy-MM-DD HH24: MI: ss ')
,