select * from table where myDate>'2003-3-3' and myDate<'2003-3-4'

解决方案 »

  1.   

    select * from table where myDate>='2003-3-3' and myDate<'2003-3-4'
      

  2.   

    同意 xrascal(横刀夺爱)。这么做是最经济实惠的。
      

  3.   

    select * from table where mydate between to_date('20030303','yyyymmdd') and to_date('20030304','yyyymmdd')这是Oracle的
      

  4.   

    同病相怜,我也遇到相同的问题,数据库里存的格式是2003-3-3(SmallDateTime),可是取到页面上就变成了2003-3-3 0:00:00
      

  5.   

    DateTime sj=DateTime.Now;//时间格式为:1999-12-18 12:12:12
    TextBox7.Text=sj.ToString("yyyy-MM-dd");//时间格式为:1999-12-18
      

  6.   

    select convert(varchar(10),mydate,121) from table1
      

  7.   

    SELECT * FROM table WHERE DATEDIFF(dd, '2003-03-03', myDate)=0