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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM