title: Convert "M/d/yyyy h:mm:ss tt" to "YYYY-MM-DDThh:mm:ss.SSSZ"
body: <p>As title suggests, what I want to do is to convert my date-string e.g. </p>
  
  <ul>
  <li><code>"6/6/2014 12:24:30 PM"</code> <code>(M/d/yyyy h:mm:ss tt)</code> format</li>
  </ul>
  
  <p>to </p>
  
  <ul>
  <li><code>"YYYY-MM-DDThh:mm:ss.SSSZ"</code> format.</li>
  </ul>
  
  <p>I am trying in the following way. It's not giving me any exception, but I am getting the value like : </p>
  
  <ul>
  <li><code>"YYYY-06-DDT12:24:30.SSSZ"</code></li>
  </ul>
  
  <p>How can I exactly achieve this?</p>
  
  <pre><code>string LastSyncDateTime = "6/6/2014 12:24:30 PM";
  DateTime dt = DateTime.ParseExact(LastSyncDateTime, "M/d/yyyy h:mm:ss tt",CultureInfo.InvariantCulture);
  string result = dt.ToString("YYYY-MM-DDThh:mm:ss.SSSZ");
  </code></pre>