title: Groovy String to Date
body: <p>I am coding this with Groovy </p>
  
  <p>I am currently trying to convert a string that I have to a date without having to do anything too tedious. </p>
  
  <pre><code>String theDate = "28/09/2010 16:02:43";
  def newdate = new Date().parse("d/M/yyyy H:m:s", theDate)
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>Tue Aug 10 16:02:43 PST 2010
  </code></pre>
  
  <p>The above code works just fine, however when my string changes to something like:</p>
  
  <pre><code>String testDate = "Tue Aug 10 16:02:43 PST 2010"
  def newerdate = new Date().parse("d/M/yyyy H:m:s", testDate)
  </code></pre>
  
  <p>It tells me that "there is no such value for Tue". I tried to throw an 'E' in the parse for the date but it said the date was not able to be parsed.</p>
  
  <p>Can someone explain how I should go about parsing the second example?</p>