title: DatePicker Formatting
body: <p>I realise this question has <em>most likely</em> been asked many times before, but I can't seem to find a simple, definitive answer.</p>
  
  <p>I have a DatePicker in C# (WPF) that when I show its content is printed like this: <code>30 October 2015</code></p>
  
  <p>This is obviously an issue when I come to convert it, which I try to do like so;</p>
  
  <pre><code>newJob.DateCreated = DateTime.ParseExact(createdPicker.Text, "YYYY-MM-DD", CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>This throws an error <code>String was not recognized as a valid DateTime.</code> which I assume comes about because it doesn't understand <code>October</code> instead of <code>10</code>. </p>
  
  <p>How would I format this correctly?</p>