以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  筛选时间问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=158509)

--  作者:BG小白
--  发布时间:2020/11/22 14:35:00
--  筛选时间问题
Dim dt1 As Date = Date.Today.AddDays(-1)
DataTables("SG_Gathering").LoadFilter = "dtDate >= \'" & dt1 & "\' And dtDate <= \'" & dt1 & "\'"
DataTables("SG_Gathering").Load()
这个代码是哪里有问题吗?为什么没有数据?

Dim dt1 As Date = Date.Today.AddDays(-1)
DataTables("SG_Gathering").LoadFilter = "dtDate >= \'" & dt1 & "\'"
DataTables("SG_Gathering").Load()
如果这样写,就有两天的数据,但是我只想要一天的

--  作者:BG小白
--  发布时间:2020/11/22 15:10:00
--  
已经解决了
我增加了一个移除
Dim dt2 As Date = Date.Today
DataTables("SG_Gathering").RemoveFor("dtDate >= \'" & dt2 & "\'" )

--  作者:有点蓝
--  发布时间:2020/11/22 21:10:00
--  
DataTables("SG_Gathering").LoadFilter = "dtDate >= \'" & dt1 & "\' And dtDate < \'" & Date.Today & "\'"
DataTables("SG_Gathering").Load()