title: DateTime problems when moving to production environment
body: <p>I have several forms within my MVC app that have date values which are chosen via a datepicker tool. This works well when debugging locally but on deployment to the cloud environment my dates are not being correctly converted. I have the following code:</p>
  
  <pre><code>string[] uploaddate = form.GetValues("uploaddate");
  string[] expirydate = form.GetValues("expirydate");
  </code></pre>
  
  <p>This gets the date as 31/08/2013 etc. and from here I was converting to DateTime as follows:</p>
  
  <pre><code>Convert.ToDateTime(uploaddate[0]);
  Convert.ToDateTime(expirydate[0]);
  </code></pre>
  
  <p>When I deploy to the Azure server I receive the following error: </p>
  
  <p><strong>String was not recognized as a valid DateTime.</strong></p>
  
  <p>I think that the instance image has a culture of US while my application was designed in UK format. How can I get around this problem so that the information is saved to the database regardless of the culture of the user?</p>