title: java.text.ParseException: Unparseable date: "2018-05-23T06:39:37+0000"
body: <p>I'm trying to create a <code>Date</code> from a <code>String</code> I receive from the server. The <code>String</code> is: </p>
  
  <blockquote>
    <p>2018-05-23T06:39:37+0000</p>
  </blockquote>
  
  <p>So the correct format should be:</p>
  
  <blockquote>
    <p>yyyy-MM-dd'T'HH:mm:ss.SSSZ</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>String createdDate = comment.getCreatedDateTime();
  SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.US);
  try {
      Date parsedDate = simpleDateFormat.parse(createdDate);
      createdDate = parsedDate.toString();
  } catch (ParseException ex) {
      ex.printStackTrace();
  }
  mCommentDate.setText(createdDate);
  </code></pre>
  
  <p>I don't know if there is any way to do this, because after that I would like to parse again to the next format:</p>
  
  <blockquote>
    <p>dd/MM/yyyy hh:mm</p>
  </blockquote>
  
  <p>I've tried to parse the original <code>String</code> using this last format directly but I'm getting the same exception.</p>
  
  <p>Any suggestion?</p>