title: Casting String to DateTime
body: <p>I have a string in format</p>
  
  <blockquote>
    <p>Jul 13 2011  1:07PM</p>
  </blockquote>
  
  <p>I want to cast it as </p>
  
  <pre><code>dd/MM/yyyy HH:mm tt
  
      e.g: 13/7/2011 11:49:00 AM //string=Jul 13 2011  1:07PM
  </code></pre>
  
  <p>I am using following code to cast it to date.</p>
  
  <pre><code>DateTime date = Convert.ToDateTime(Convert.ToDateTime(myDateString).ToString("dd/MM/yyyy HH:mm:ss"));
  </code></pre>
  
  <p>This works fine if my day in my string is less than 13</p>
  
  <pre><code>Jul 12 2011  1:07PM //this will cast to desire format fine!
  
      Jul 13 2011  1:07PM //gives error String was not recognized as a valid DateTime. 
  </code></pre>
  
  <p>I understand that it is taking day as month but I can not found a way to cast it to desire format.</p>