任何人都知道为什么以下内容返回8
?我期待 8 小时 30 分钟,还是 8.5?
declare @start_day datetime;
declare @end_day datetime;
declare @start_time datetime;
declare @end_time datetime;
set @start_day = '2014-06-18';
set @end_day = '2014-06-18';
set @start_time = '09:00';
set @end_time = '17:30';
print datediff(hour,@start_day + @start_time, @end_day + @end_time);