title: Groovy : Attempting to parse a date
body: <p>I am attempting to parse a date string using groovy but running into issues. Here is what the string looks like and logic which isn't working.</p>
  
  <pre><code>def dateString = "2017-01-01T12:00:00Z"
  def date = Date.parse("yyyy-MM-dd HH:mm:ss", dateString)
  </code></pre>
  
  <p>Ive also tried</p>
  
  <pre><code>def date = Date.parse("yyyy-MM-dd'T'HH:mm:ssZ", dateString)
  </code></pre>
  
  <p>which doesn't parse either. Any help would be most appreciated.</p>
  
  <p>Thanks in advance for your help.</p>