同时采用>= and <= 查询一天的数据,否则你查询的数据不完整

解决方案 »

  1.   

    select * from tab where ytime between 时间1 and  时间2
      

  2.   

    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中)
      

  3.   

    select * from 表名 where 时间 between 起始时间 and 结束时间
      

  4.   

    用参数吧:
    select * from tab where ytime between :sDate and  :eDate
    paramByName('sDate').AsDateTime :=Trunc(DateTimePikcer1.Datetime);
    paramByName('eDate').AsDateTime :=Trunc(DateTimePikcer2.Datetime)+1;