tb1.Fill("Sel ect camera_rec_record.id_number as 编号, camera_rec_record.person_name as 姓名,学生信息.班级,camera_rec_record.match_date as 日期,camera_rec_record.match_time As 时间,camera_rec_record.id From {camera_rec_record} left join 学生信息 on camera_rec_record.id_number ={学生信息}.身份证件号 and camera_rec_record.match_time >= '" & Date.Today & " 00:00:00' and camera_rec_record.match_time<= '" & Date.Today & " 23:59:59'order by match_time desc","user",True)
请问老师上面句子不行,查出的是所有记录,不是当天
2楼
有点蓝 发表于:2024/5/30 13:51:00
sql没有问题。估计是数据有问题。
把完整sql拿去后台数据库查询看看
[此贴子已经被作者于2024/5/30 13:51:29编辑过]
3楼
刘林 发表于:2024/5/30 21:39:00
2024-05-30 14:19:19.000
数据库中的数据如上,后面有个.000,这个怎么办
4楼
有点蓝 发表于:2024/5/30 21:42:00
这个不影响查询的,或者试试
and camera_rec_record.match_time >= '" & Date.Today & "' and camera_rec_record.match_time < '" & Date.Today.adddays(1) & "' order by match_time desc","user",True)