以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]日期筛选 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=103723) |
-- 作者:lgj716330 -- 发布时间:2017/7/15 11:42:00 -- [求助]日期筛选 With e.Form.Controls("RQ1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "日期 >= " & .value End If End With With e.Form.Controls("RQ2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "日期 <= " & .value End If End With 在统计中使用上述筛选条件的时候出现错误提示“无法在 System.DateTime 和 System.Int32 上执行“>=”操作。”,要如何表示
|
-- 作者:有点蓝 -- 发布时间:2017/7/15 11:58:00 -- Access Filter = Filter & "日期 >= #" & .value & "#" Sqlserver Filter = Filter & "日期 >= \'" & .value & "\'" 下面的日期一样,自己改改
|
-- 作者:lgj716330 -- 发布时间:2017/7/29 16:30:00 -- Dim Filter As String = "1=1" With e.Form.Controls("RQ1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "日期 >= \'" & .value & "\'" End If End With With e.Form.Controls("RQ2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "日期 <= \'" & .value & "\'" End If End With Dim Vals As List(of String()) Vals = DataTables("入库表").GetValues("日期|部门"," & Filter & ") 标颜色的这里应该如何写
[此贴子已经被作者于2017/7/29 16:30:46编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/7/29 16:38:00 -- 画蛇添足 Vals = DataTables("入库表").GetValues("日期|部门",Filter)
|