SELECT to_date(‘2022-12-01 13:20:20’,‘yyyy-mm-dd hh:mi:ss’)
报错 ORA-01849: hour must be between 1 and 12
因为时间不是12小时制
修改为
SELECT to_date(‘2022-12-01 13:20:20’,‘yyyy-mm-dd hh24:mm:ss’)
报错 ORA-01810: format code appears twice
因为mm出现了两次
改为 SELECT to_date(‘2022-12-01 13:20:20’,‘yyyy-mm-dd hh24:mi:ss’)