Access"select * from tab where fld between #2002-2-12 1:00:00# and #2002-3-4 14:00"假如是SQL Server#改成'

解决方案 »

  1.   

    Access
    "select * from tab where fld1 between #2002...# and #2002...#"MSSQL"select * from tab where fld1 between '2002...' and '2002...'"
      

  2.   

    where 时间日期字段>'2002-3-14 1:00:00 ' and 时间日期字段<'2002-5-14 17:00'
      

  3.   

    还是使用between #time1# and #time2#
    有什么问题?
      

  4.   

    时间应该用#扩起来
    取时间字段的部分你可以用hour(time1)等
    在比较时间的时候,由于时间格式不一样,你可以用format(time1,"yyyy-mm-dd")一下
      

  5.   

    如果是access数据库
    最好用between DateValue(time1) and DateValue(time2)