declare @starttime as datetime declare @endtime as datetime set @starttime = '2009-11-24 15:10:00' set @endtime = '2009-11-24 15:12:24' )+':'+ )+':'+ ) as TimeEd 定义为函数 create FUNCTION [f_TimeBetween] ( @start datetime, @end datetime ) ) AS BEGIN )+':…
function diffTime(startDate,endDate) { startDate= new Date(startDate); endDate = new Date(endDate); var diff=endDate.getTime() - startDate.getTime();//时间差的毫秒数 //计算出相差天数 var days=Math.floor(diff/(24*3600*1000)); //计算出小时数 var leave1=diff%(24*3600*1000)…