title: Convert "2018-02-02T06:54:57.744Z" String to date in Android
body: <p>Basically my date string is ISO-8601 date string, So I searched for converting ISO-8601 date string to date, but the solutions are lengthy. Here are the details.</p>
  
  <p>I have a string <code>2018-02-02T06:54:57.744Z</code> want to convert it to Date but I am getting error:</p>
  
  <pre><code>java.text.ParseException: Unparseable date: "2018-02-02T06:54:57.744Z"
  </code></pre>
  
  <p>I am using following technique to do that but no success:</p>
  
  <pre><code>SimpleDateFormat parser = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
          parser.setTimeZone(TimeZone.getTimeZone("UTC"));
          Date parsed = parser.parse(utcDateString);
          return parsed;
  </code></pre>
  
  <p>I also use following patterns with <code>SimpleDateFormat</code> but no success:</p>
  
  <pre><code>yyyy-MM-dd'T'HH:mm:ss.SSSZ
  yyyy-MM-dd HH:mm:ss.S
  yyyy-MM-dd'T'HH:mm:ssX
  yyyy-MM-dd'T'HH:mm'Z'
  </code></pre>
  
  <p>any solution to this problem.</p>