title: "String was not recognized as a valid DateTime." Error occur in Window 7 computer environment
body: <p>Good day All,</p>
  
  <p>Before this, I have a c# system in a VM with Microsoft Window XP. I have some code to convert string to date time, the following is part of my code :</p>
  
  <pre><code>DateTime allowDateTime = DateTime.Now.AddMonths(-2);
  string formatted = allowDateTime.ToString("M/dd/yyyy");
  DateTime dt = Convert.ToDateTime(formatted);
  
  if (redempDateConvert &lt; dt)
     td.Text = "";
  </code></pre>
  
  <p>Until this point, everything is working fine.
  After that, I move my all source code without any changes, and data base and set it up in my real machine (Window 7). </p>
  
  <p>System is working fine, I am still able to log in and control the system like usual.</p>
  
  <p>Until today, I have reach to this part, and browser displayed error message :
  <code>String was not recognized as a valid DateTime.</code> in line 397.</p>
  
  <p>Here I displayed my code again (with explanation):</p>
  
  <pre><code>    DateTime allowDateTime = DateTime.Now.AddMonths(-2);
      string formatted = allowDateTime.ToString("M/dd/yyyy");
      DateTime dt = Convert.ToDateTime(formatted);  //here is line 397, which is the error happening.
  
      if (redempDateConvert &lt; dt)
         td.Text = "";
  </code></pre>
  
  <p>I have checked both (VM and my real machine) environment, both running in .Net 4.0.</p>
  
  <p>Just curious on why the same code, but there is an error happen in my real machine. Is that I miss out to configure something? 
  Kindly advise.</p>