sql语句中的到期查询

使用DATEDIFF函数,类如

select * from Patents where DATEDIFF(month,ApplicantDate,GETDATE())<=1 and DATEDIFF(month,ApplicantDate,GETDATE())>=0

查询距离查询日期一个月以内的数据。

posted on 2020-02-22 17:27  hanzq_go  阅读(711)  评论(0编辑  收藏  举报

导航