I got a error when I do the follow:
DateFrom has as datatype of datetime

My C# code:
string strQuery = "Select * FROM Agenda Where DateFrom='" + Calendar1.SelectedDate.Date.Date + "' ";
SqlCommand command = new SqlCommand(strQuery, Global.myConn);
da = new SqlDataAdapter(command);
da.Fill(Global.dsAgenda, "Tabel");
ddlActivity.DataSource = Global.dtAgenda;
ddlActivity.DataBind();
Calendar1 type:

Error:
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
Calendar1.SelectedDate.Date.Datein? Print it out and check. It's trying to cast it to a date (to compare) and failing. Please indicate what kind of database and version. SQL Server?