sql="select top 30 * from 用户 where DATEDIFF(month,lasttime,'"& now &"')=0 order by 粪库 desc"
或
sql="select top 30 * from 用户 where DATEDIFF(month,lasttime,getdate)=0 order by 粪库 desc"
sql="select top 30 * from 用户 where DATEDIFF(month,lasttime,'"& now &"')=0 order by 粪库 desc"
或
sql="select top 30 * from 用户 where DATEDIFF(month,lasttime,getdate)=0 order by 粪库 desc"