SQL语句按时间查询,求助
我在程序中用四个DTPICKER控件实现年月日时分秒的精确查找。请问下面的语句为什么不能按年月日+时分秒的方式精确查找数据呢?
strsql = "select * from invoice where qtime between cdate('" & dtpicker1.Value & +&dtpicker2.value&"') and cdate('" & dtpicker3.Value &+*dtpicker4.value& "')"
[解决办法]
strsql = "select * from invoice where qtime between '" & dtpicker1.Value & " " & dtpicker2.value&"' and '" & dtpicker3.Value & " " & dtpicker4.value& "'"
[解决办法]
楼主把SQL语句贴出来看看