首页 > 其他 > 详细

8.05 确定两个日期之间的秒、分、小时数

时间:2017-09-14 22:46:12      阅读:279      评论:0      收藏:0      [点我收藏+]

select datediff(ward_hd,allen_hd)*24 hr,
             datediff(ward_hd,allen_hd)*24*60 min,
             datediff(ward_hd,allen_hd)*24*60*60 sec
from (  
select max(case when ename=‘WARD‘
then hiredate
end) as ward_hd,
max(case when ename=‘ALLEN‘
then hiredate
end ) as allen_hd
from emp
) x;             

8.05 确定两个日期之间的秒、分、小时数

原文:http://www.cnblogs.com/liang545621/p/7523308.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!