老师好,我有一个DateLongTime格式的日期列“填加时间”,
Dim s As String = "排序_定向区域"
Dim a1 As Date
Dim lb As String = s.Replace("排序_", "")
a1 = DataTables("专业_排序").SQLCompute("max(填加时间)", "科类='" & Vars("科类") & "' and 考生id='" & Vars("联系电话") & "' and 批次='" & Vars("批次") & "' and 排序类别='" & lb & "'")
Output.Show(a1)
Dim drs As List(Of DataRow) = DataTables("专业_排序").SQLSelect("科类='" & Vars("科类") & "' and 考生id='" & Vars("联系电话") & "' and 批次='" & Vars("批次") & "' and 排序类别='" & lb & "' and 填加时间='" & a1 & "'")
Output.Show(drs.Count)
-----------------------------------------------------------------
2023-05-17 14:33:00
0
请问老师,红字部分如何写,现在这种写法,查出不记录来 ? 这种写法也不行 填加时间=#" & a1 & "#"
[此贴子已经被作者于2023/5/17 15:05:22编辑过]