title: how to change date format from dd-MMM-yyyy to yyyy-MM-dd
body: <p>I can't change date format, I've tried 2 methods but the output is <code>0001-01-01</code> <br /></p>
  
  <p><strong>Method 1</strong></p>
  
  <pre><code>hf_test.Value = "1-Jul-2013";
  
  DateTime date;
  var success = DateTime.TryParseExact(hf_test.Value,
      "dd-MMM-yyyy",
      CultureInfo.InvariantCulture,
      DateTimeStyles.None,
      out date);
  
      Resopnse.Write(date.ToString("yyyy-MM-dd"));
  </code></pre>
  
  <p><strong>Method 2</strong></p>
  
  <pre><code>        hf_test.Value = "1-Jul-2013";
          Alert.Show(DateTime.ParseExact(hf_test.Value , "dd-MMM-yyyy", culture).ToString("yyyy-MM-dd"));
  </code></pre>