title: String was not recognized as a valid DateTime in C# asp.net
body: <p>I want to import date value from excel cell. cell value having "10 October 2013" format. I want to convert it to datetime data type. My code getting error "string was not recognized as a valid datetime"</p>
  
  <p>//code</p>
  
  <pre><code>      OleDbCommand olecmd = new OleDbCommand("select * from [Sheet1$]", olecon);
  
  
                 OleDbDataReader olerdr = olecmd.ExecuteReader();
                   while (olerdr.Read())
                   {
                      deldate = olerdr.GetValue(13).ToString();
                       using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["irisdb"].ConnectionString))
                       {
                           con.Open();
                           SqlCommand cmd = new SqlCommand("procdamandrugs", con);
                           cmd.CommandType = CommandType.StoredProcedure;
       DateTime dt = DateTime.ParseExact(deldate, "MM/dd/yyyy", CultureInfo.InvariantCulture);//getting error in this line
                           SqlParameter par9 = new SqlParameter();
                           par9.ParameterName = "@deleffdate";
                           par9.SqlDbType = SqlDbType.DateTime;
                           par9.Value = dt;
                           cmd.Parameters.Add(par9);
   cmd.ExecuteNonQuery();
      }
      }
  </code></pre>
  
  <p>Do any one help me to solve this issue.</p>