版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cplvfx/article/details/82023374
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'