可能是服务器的日期格式引起的
可以修改下日期时间格式
也可以把now()换成date()
sql="select top 4 username,count(username) from bbs_topic where datediff('d',time,#" & date() & "#)<1 group by username order by count(username) desc"
还可以试试这个(推荐使用)
sql="select top 4 username,count(username) from bbs_topic where datediff('d',time,date())<1 group by username order by count(username) desc"
sql="select top 4 username,count(username) from bbs_topic where datediff('d',time,now())<1 group by username order by count(username) desc"
另外确保datediff中的time有效