--你的原意应该这样 rs.open("select * from info where flag>=1 and sortid is not null and dateandtime='"&date&"'"),conn,1,1--这样是同到秒 rs.open("select * from info where flag>=1 and sortid is not null and datediff(second,dateandtime,'"&date&"')=0 " ),conn,1,1--这样日期为同一天 rs.open("select * from info where flag>=1 and sortid is not null and datediff(day,dateandtime,'"&date&"')=0 " ),conn,1,1
rs.open("select * from info where flag>=1 and sortid is not null and dateandtime='"&date&"'"),conn,1,1--这样是同到秒
rs.open("select * from info where flag>=1 and sortid is not null and datediff(second,dateandtime,'"&date&"')=0 " ),conn,1,1--这样日期为同一天
rs.open("select * from info where flag>=1 and sortid is not null and datediff(day,dateandtime,'"&date&"')=0 " ),conn,1,1