27,580
社区成员
发帖
与我相关
我的任务
分享DATEDIFF(mi, CONVERT(VARCHAR(5),[START_TIME],114) ,'11:30')if object_id('Test') is not null drop table Test
go
create table Test(START_TIME datetime,FINISH_TIME datetime)
go
insert into Test
select '2012-07-13 08:01:00.000', '2012-07-13 08:33:00.000' union all
select '2012-07-14 08:01:00.000', '2012-07-14 12:00:00.000' union all
select '2012-07-19 08:21:00.000', '2012-07-19 16:30:00.000' union all
select '2012-07-15 08:01:00.000', '2012-07-15 17:50:00.000' union all
select '2012-07-12 08:30:00.000', '2012-07-12 21:00:00.000' union all
select '2012-07-20 12:00:00.000', '2012-07-20 12:30:00.000' union all
select '2012-07-21 12:00:00.000', '2012-07-21 15:30:00.000' union all
select '2012-07-22 12:00:00.000', '2012-07-22 17:50:00.000' union all
select '2012-07-23 12:00:00.000', '2012-07-23 19:00:00.000' union all
select '2012-07-24 13:00:00.000', '2012-07-24 16:00:00.000' union all
select '2012-07-25 13:00:00.000', '2012-07-25 17:50:00.000' union all
select '2012-07-26 13:00:00.000', '2012-07-26 19:00:00.000' union all
select '2012-07-27 17:50:00.000', '2012-07-27 17:55:00.000' union all
select '2012-07-28 17:50:00.000', '2012-07-28 19:40:00.000' union all
select '2012-07-29 19:00:00.000', '2012-07-29 20:00:00.000'
go