已经将日历控件选定的日期写进数据库并且有其他的文字输入。如何在前台通过日历控件选择的时间来显示写入数据库的内容。

解决方案 »

  1.   

    selct * from 表 where time = '日历控件时间'
      

  2.   

    selct * from 表 where time = '日历控件时间'
      

  3.   

    selct * from 表 where time = '日历控件时间'+1
      

  4.   

    如果精确到时间的话用select * from 表 where InsTime='日历时间' 
    如果如标题只查某个日期的话,那就要改一下了
    select * from 表 where datediff(day,InsTime,'日历时间')=0 
      

  5.   

       SqlConnection con = DB.createCon();
                    SqlCommand cmd = new SqlCommand("", con);
                    cmd.CommandText = "Insert into tuzhi values('"+tuzhibianhao +"',@files,'"+  dateTimePicker1.Text+"')";