oracle日期时间型timestamp的深入讲解
程序员文章站
2022-03-09 22:05:32
1、字符型转成timestamp
select to_timestamp('01-10月-08 07.46.41.000000000 上午','dd-mon-yy hh:...
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;
上一篇: 进程
下一篇: Java构造方法和方法重载详解