查询两个时间段间隔多久的数据

select from tbname where datediff(dd,'2008-03-20',getdate())>30   天
select from tbname where datediff(mm,'2008-04-20',getdate())>0   月
原文地址:https://www.cnblogs.com/zpbk/p/9288570.html