select to_date('2009-12-25 14:23:31','yyyy-mm-dd,hh24:mi:ss') from dual
2009-12-25 14:23:31
ORA-01861: literal does not match format string
1). ORA-01861: 文字与格式字符串不匹配
2). 必须指定日期格式
to_date('2021-05-11 14:20:24' , 'yyyy-mm-dd hh24:mi:ss')
3). 比较时间也可以将数据的时间字段 to_char('时间','yyyy-mm-dd hh24:mi:ss').
变成字符串, 再去按字符串比较.