title: Groovy java.sql.Timestamp.toString() to java.sql.Timestamp
body: <p>I have this problem converting <code>java.sql.Timestamp.toString</code> back to <code>java.sql.Timestamp</code>. Given <code>element = "2012-08-01 00:00:00.0"</code> and using the code below would return a <code>ParseException</code> telling that <code>element</code> is an <code>Unparseable date</code>.</p>
  
  <pre><code>import java.sql.Timestamp
  import java.text.SimpleDateFormat
  
  Timestamp string_timestamp(String element) {        
    if(!date)
      return null 
    SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy")
    // error lies here! //
      Date parsedDate = dateFormat.parse(date)
    return new Timestamp(parsedDate.getTime())
  }
  </code></pre>
  
  <p>Is there a way to convert <code>java.sql.Timestamp.toString()</code> back to <code>java.sql.Timestamp</code>?</p>