一种:
ymda=cdate(request("ymda"))
ymdb=cdate(request("ymdb"))rs.open "select * from guess where uid='" & Tag & "' and'" & " dt BETWEEN '" & Format(ymda, "yyyy/mm/dd") & "' AND '" & Format(ymdb, "yyyy/mm/dd") & "' order by dt desc", , 1, 2
rs.open "select * from guess where uid='" & Tag & "' and'" & " dt BETWEEN '" & Format(ymda, "yyyy/MM/dd hh:mm:ss") & "' AND '" & Format(ymdb, "yyyy/MM/dd hh:mm:ss") & "' order by dt desc", , 1, 2或者rs.open "select * from guess where uid='" & Tag & "' and " & " DateDiff(d,convert(datetime,'" & Format(ymda, "yyyy/mm/dd") & "'),dt)>=0 " & _
" and  DateDiff(d,dt,convert(datetime,'" & Format(ymdb, "yyyy/mm/dd") & "'))>=0  order by dt desc", , 1, 2