I am trying to parse this String date : "2020-06-25T07:48:32Z" to a Date like "2020-06-25" and I did a method like this :
String newDateFormat = "yyyy-MM-dd";
try {
Date newparseDate = new SimpleDateFormat(newDateFormat).parse(date);
System.out.println(newparseDate);
return new SimpleDateFormat(dateTimeFormatPattern).parse(date);
} catch (ParseException px) {
px.printStackTrace();
}
return null;
}
But I got this format: Thu Jun 25 00:00:00 CEST 2020