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

 

posted @ 2017-07-11 14:06  二更  阅读(534)  评论(0编辑  收藏  举报