Oracle to_date, to_timestamp

to_timestamp:

select to_timestamp('2012-12-31', 'yyyy-mm-dd hh12.mi.ss') from dual;

result:  31-DEC-12 12.00.00.000000000 AM

to_date

select to_date(sysdate, 'yyyy-mm-dd hh12:mi:ss') from dual;

resilt: 17-JUL-11

原文地址:https://www.cnblogs.com/mid-wk/p/7150217.html