//Hi! I am facing a problem whenever I try to insert Date using DatePicker
DateTime birth_date=Convert.ToDateTime(datePickerEBirthDate.SelectedDate);
SqlConnection SQLconnection = new SqlConnection(@"Server=MyMachineName\SQLEXPRESS;Database=MyDataBase;Integrated Security=SSPI");
SqlCommand command = SQLconnection.CreateCommand();
SQLconnection.Open();
command.CommandText = "INSERT INTO courses " +
"(name, birthdate) VALUES " +
"(@name, @birthdate)";
command.Parameters.AddWithValue("@name", txtName.Text);
command.Parameters.AddWithValue("@birthdate", birth_date);
command.ExecuteNonQuery();
SQLconnection.Close();
//and this is the error message