码迷,mamicode.com
首页 > 数据库 > 详细

oracle TIMESTAMP日期相减

时间:2016-09-05 19:29:37      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

select extract(day from inter) * 24 * 60 * 60 +  
       extract(hour from inter) * 60 * 60 + extract(minute from inter) * 60 +  
       extract(second from inter) "seconds"  
  from (select to_timestamp(‘20100115112233‘, ‘yyyymmddhh24miss‘) -  
               to_timestamp(‘20100101123456‘, ‘yyyymmddhh24miss‘) inter  
          from dual);

 

oracle TIMESTAMP日期相减

标签:

原文地址:http://www.cnblogs.com/sprinng/p/5843246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!