欢迎投稿

今日深度:

oracle日期时间型timestamp的深入讲解,oracletimesta

oracle日期时间型timestamp的深入讲解,oracletimestamp


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;  

www.htsjk.Com true http://www.htsjk.com/oracle/24047.html NewsArticle oracle日期时间型timestamp的深入讲解,oracletimestamp 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(...
评论暂时关闭