select
*
from
tbname
where
datediff(dd,
‘2008-03-20‘
,getdate())>30 天
datediff(mm,
‘2008-04-20‘
,getdate())>0 月
查询两个时间段间隔多久的数据
原文:https://www.cnblogs.com/zpbk/p/9288570.html