title: Date formatter Mon, 03 May 2021 00:00:00 GMT
body: <p>I want to convert this <code>String</code> to <code>Date</code></p>
  <p><code>Mon, 03 May 2021 00:00:00 GMT</code></p>
  <pre><code>let dateString = &quot;Mon, 03 May 2021 00:00:00 GMT&quot;
  let dateFormatter = DateFormatter()
  dateFormatter.dateFormat = &quot;EEE, dd MMM yyyy hh:mm:ss 'Z'&quot;
  date = dateFormatter.date(from: dateString)
  </code></pre>
  <p>but it doesn't work, <code>date</code> is nil. So what is the correct format for this case?</p>