1、字符型转成timestamp
select to_timestamp(‘2020-11-18 12:52:42.123456789’, ‘yyyy-mm-dd hh24:mi:ss.ff’) from dual;
2、timestamp转成date型
select cast(to_timestamp(‘2020-11-18 12:52:42.123456789’, ‘yyyy-mm-dd hh24:mi:ss.ff’) as date) timestamp_to_date from dual;