title: String was not recognized while converting Date Format
body: <p>How to convert "dd/mm/yyyy" to "yyyy-mm-dd" format.
  I've tried it like this:</p>
  
  <pre><code> DateTime dtInputDate = DateTime.Parse(txtDate.Text); //txtDate.Text = "19/07/2012"
   string strOutputDateFormat = "YYYY-MM-DD";
   dtInputDate.ToString(strOutputDateFormat);
   txtDate.Text = dtInputDate.ToShortDateString();
  </code></pre>
  
  <p>but got an error:
  String was not recognized as a valid DateTime.</p>