呵呵,SQL Server的SQL语句是这么比较的.
可能你的日期不单单是日期,还包括时间。
g.Filter = "[sell_date]>='" & e.form.Controls("dtpXiaoshouriqikaishi").text & "' and [sell_date]<='" & e.form.Controls("dtpXiaoshouriqijieshu").text & "'"
改为:
Dim d As date = e.form.Controls("dtpXiaoshouriqijieshu").value
d =d.AddDays(1)
g.Filter = "[sell_date] >= '" & e.form.Controls("dtpXiaoshouriqikaishi").text & "' and [sell_date] < '" & d & "'"