ORACLE数据库,Timestamp 的时间格式转换
1、字符型转成timestamp
select to_timestamp(loga006,'dd-MON-yyhh:mi:ss.ff AM') from loga_t;
2、timestamp转成date型
select cast(to_timestamp(loga006,'dd-MON-yyhh:mi:ss.ff AM')as date) timestamp_to_date
loga_t
3、date型转成timestamp
select cast(sysdateas timestamp) date_to_timestamp from loga_t
4、获取timestamp格式的系统时间
select systimestamp from loga_t