title: C# DateTime Exception error
body: <p>I have dates column within an excel which are 01.02.2016 format all the way through (and maybe changed to 01/02/2016 in the future) and for each row they are added to a data table in my backgroundworker.</p>
  
  <p>Looping through each datatable row i grab the date column and try to change the date a few times to get the correct sqlite format to save to the database.</p>
  
  <p>See below;</p>
  
  <pre><code>foreach datatablerow {
  
      //change dots to slashes 
      string dateString = Convert.ToString(rowData["Date"]).ToString().Replace(".", "/");
  
      //do DateTime C# Formatting..
      //This is causing the crash/exception
      DateTime _dateString = Convert.ToDateTime(dateString);
      //also have used &amp; crahses as well
      //DateTime _dateString = DateTime.Parse(dateString);
  
      //Change agian to suit sqlite database entry - 2016/02/01
      string change_dateString = _dateString.ToString("yyyy-MM-dd");
  
      //Insert database data...
  
  }
  </code></pre>
  
  <p>However, I get System.FormatException: String was not recognized as a valid DateTime errors on the transaction loop (even though on another computer the same transaction works using the above code...</p>
  
  <p>When I console each date I can see thet it gets converted correctly to 01/02/2016 but the DateTime part crashes..</p>