您的位置:首页 > 数据库 > Oracle

oracle日期时间型timestamp的深入理解

2017-12-18 19:45 337 查看
1、字符型转成timestamp

select to_timestamp('01-10月-08 07.46.41.000000000 上午','dd-MON-yy hh:mi:ss.ff AM')
from dual;


2、timestamp转成date型

select cast(to_timestamp('01-10月-08 07.46.41.000000000 上午','dd-MON-yy hh:mi:ss.ff AM') as date) timestamp_to_date
from dual;


3、date型转成timestamp

select cast(sysdate as timestamp) date_to_timestamp
from dual;


4、获取timestamp格式的系统时间

select systimestamp from dual;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: