sql server 中没有 day()函数。
你要用 where datediff(d,adddate,getdate()) <=1 and datediff(d,adddate,getdate()) > -1 来获取同一天的数据。