title: java.lang.IllegalArgumentException: Parse error: Unable to parse Date format
body: <p>I need to format following date fomat</p>
  
  <pre><code> timeBooked: "2015-05-20T02:08:00.000Z",
   ExpiryTime: "2015-05-20T04:08:00.000Z",
  </code></pre>
  
  <p>My code follows to format the date:</p>
  
  <pre><code>try {
       Date currentDate = new Date(timeBooked);
       SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.ZZ", Locale.ENGLISH);
       Log.e(TAG, "formatted time string: " + sdf.format(currentDate.getTime()));
  
       Log.e(TAG, "date string:=" + currentDate.getDate());
  } catch (Exception e) {
           Log.e(TAG, e.getMessage());
           e.printStackTrace();
  }
  </code></pre>
  
  <p>While running this code getting <strong>java.lang.IllegalArgumentException: Parse error:2015-05-20T02:08:00.000Z</strong>.</p>