select * from tab where ytime between '1999-10-10' and '2000-1-1' (SQL语法)或select * from tab where ytime between #1999-10-10# and #2000-1-1#(在VB中)
select * from 表名 where 时间 between 起始时间 and 结束时间
用参数吧: select * from tab where ytime between :sDate and :eDate paramByName('sDate').AsDateTime :=Trunc(DateTimePikcer1.Datetime); paramByName('eDate').AsDateTime :=Trunc(DateTimePikcer2.Datetime)+1;
(SQL语法)或select * from tab where ytime between #1999-10-10# and #2000-1-1#(在VB中)
select * from tab where ytime between :sDate and :eDate
paramByName('sDate').AsDateTime :=Trunc(DateTimePikcer1.Datetime);
paramByName('eDate').AsDateTime :=Trunc(DateTimePikcer2.Datetime)+1;