时间格式为(yyyy-mm-dd hh:mm:ss).

解决方案 »

  1.   

    select * from 表 where 时间字段>='''+datetimetostr(起始时间)+''' and 时间字段 <= '''+datetimetostr(终止时间)+'''
      

  2.   

    select * from 表 where between '''+datetimetostr(时间1) +''' and  '''+datetimetostr(时间2)+'''
      

  3.   

    查找某一时间段的记录:
    select * from 表 where 日期字段between'2005/12/12 and 2005/12/30

    select * from 表 where  convert(int,日期字段)>20051212 and 
                            convert(int,日期字段)<20051230