如何查找两时间段记录
DTPicker1.Value 日期1
DTPicker2.Value 日期2
DTPicker3.Value 时间1
DTPicker4.Value 时间2
如何查找日期1+时间1,到日期2+时间2之间的记录,下面语句总是出错
Measuring_Time定义的是datetime类型
Set Rs = QueryExt("select * from [Measured_Record] where [Measuring_Time] between #" & DTPicker1.Value & " " & DTPicker3.Value & "# and #" & DTPicker2.Value & " " & DTPicker4.Value & "# and [Part_Name]='" & strPartName & "' and [Part_Number]='" & strPartNumber & "' order by [Measuring_Time]")
[解决办法]
between time1 and time2
[解决办法]
呵呵,应该是这种形式
between #time1# and #time2#