-- --Datetime format = '2013-10-21 12:12:12.000'
显然语法很差,但你可以看到我想要做什么
select personnum, convert(decimal, shiftEndDate, 4)-convert(decimal, ShiftStartDate, 4) as ShiftInSeconds
from dbo.Time
where shiftStartDate between '2013-10-14 00:00:00.000' and '2013-10-20 23:59:59.000'