SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Date date = new Date();
String dateTime = dateFormat.format(date);
Converting string to date
MainActivity.java
String dtStart ="2019-03-15T09:27:37Z";SimpleDateFormat format =newSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");try { date =format.parse(dtStart);System.out.println(date);String text =FuzzyDateTimeFormatter.getTimeAgo(MainActivity.this, date);} catch (ParseException e) {e.printStackTrace();}