str="Select  * From 表1 Where time =02-06-20";这样是正但找不到记录而在数据库里是有这个记录的。

解决方案 »

  1.   

    主要是你的时间表示方法错误,试试以下语句
    -----------------------------------------
    select * from table1 where time='2002-06-20'建议查找日期字段时采用convert方法,
    因为这样直观一点!
      

  2.   

    是Access吗?而且字段类型为datetime的话:
    试试:select * from table1 where time=#2002-06-20#
      

  3.   

    select * from table1 where time=#2002-06-20#是正确的,多谢大侠帮忙了。
      

  4.   

    实在不行就
    select * from table where depart(yyyy,time)=2002 and depart(mm,time)=6 and depart(dd,time)=20