asp.net, c# 时间区间查询,2个时间段查询, sql语句 用于SQLServer(mssql)
方法1
select * from [article]
where [add_time] between '2017-04-01 00:00:00' and '2017-04-20 00:00:00'
方法2
select * from [article]
where [add_time] >= '2017-04-10 00:00:00' and [add_time] <= '2017-04-20 00:00:00'