title: c# convert string to date type
body: <p>I've got this string:</p>
  
  <pre><code>string date = "Sun, 17 Mar 2013 12:40:23 +0000";
  </code></pre>
  
  <p>And trying to convert to a date type but I keep getting a not in correct format error when I try the convert.</p>
  
  <pre><code>DateTime dt = Convert.ToDateTime(date);
  </code></pre>
  
  <p>And then trying to get it into these formats:</p>
  
  <pre><code>dt.ToString("dd")
  dt.ToString("MMMM")
  dt.ToString("yyyy")
  </code></pre>