在SQL数据库里面有一个Char型的字段记录着时间值,格式为:08:05:02,
我现在想查找出时间在07:00:00至10:00:00分之间的记录,应该怎样写代码?

解决方案 »

  1.   

    StrToDate(str_date)>'07:00:00' AND StrToDate(str_date)<'10:00:00'
      

  2.   

    TO:楼上的兄弟:
    我是下面这样写,运行出错
    select * from K200304 
    where StrToDate(DKTime)>'07:00:00' AND StrToDate(DKTime)<'10:00:00'
      

  3.   

    select * from table where dktime between '07:00:00' and '10:00:00'
      

  4.   

    select * 
    from table where dktime 
    between StrToTime('07:00:00') and StrToTime('10:00:00')