select * from table1 where date='2008-10-29'
select * from table1 where date between '2008-10-29' and '2008-11-29'

解决方案 »

  1.   

     between #2008-10-29# and #2008-11-29#
      

  2.   

    string sql1 = string.Format("select * from table1 where date='{0}'", TextBox1.Text.Trim());
    string sql2 = string.Format("select * from table1 where date between '{0}' and '{1}'", TextBox1.Text.Trim(), TextBox2.Text.Trim());
      

  3.   

    注意数据库中的 adddate 是个日期/时间的格式, 而且是在ACCESS中
      

  4.   

    文本框中的日期这样取得  Textbox1.Text用ACCESS数据库,数据库的的搜索字段是adddate, 日期/时间的格式请大家再帮帮忙,谢谢
      

  5.   

    ACCESS时间类型是用#
    between #"+TextBox1.Text.Trim()+"# and #"+TextBox2.Text.Trim()+"#
    这种形式的