to_date(time, 'yyyy-mm-dd')直接转是不行的,得先用to_char(time, 'yyyy-MM-dd')格式化一下。

最后变成这样to_date(to_char(time, 'yyyy-MM-dd'), 'yyyy-mm-dd'),就不会报ORA-01861了。