34,594
社区成员
发帖
与我相关
我的任务
分享
select * from 表 where datepart(dw,时间) not in (1,7) and
convert(char(8),时间)>='08:30:00' and convert(char(8),时间)<'17:30:00'
select * from 表 where datepart(dw,时间) not in (1,7) and datepart(hh,时间)>=8 and datepart(hh,时间)<18
select * from tb where datepart(weekday,field) between 2 and 5 and datepart(hour,field) between 8 and 17