I wanted to compare the datetime which is in this format "7/20/2008" with the ones in the database which is in format "7/20/2008 7:14:53 AM".
I tried using "like" clause but it did not work beacuse the "like" clause uses only string and the one which I am using is date time format.
Can anyone tell how to convert and compare it in database and pull up datetime.
  protected void User_Querytime()
    {
    DataClasses2DataContext dc1 = new DataClasses2DataContext();
    DateTime date1;
    string date = Request.QueryString.Get("TimeOfMessage");
    date1 = Convert.ToDateTime(date);
    var query7 = from u in dc1.syncback_logs
                 where u.TimeOfMessage = date1
                 orderby u.TimeOfMessage descending
                 select u;
    GridView1.DataSource = query7;
    GridView1.DataBind();
    }