使用DATEDIFF函数,类如
select * from Patents where DATEDIFF(month,ApplicantDate,GETDATE())<=1 and DATEDIFF(month,ApplicantDate,GETDATE())>=0
查询距离查询日期一个月以内的数据。
使用DATEDIFF函数,类如
select * from Patents where DATEDIFF(month,ApplicantDate,GETDATE())<=1 and DATEDIFF(month,ApplicantDate,GETDATE())>=0
查询距离查询日期一个月以内的数据。