I have a string with yyyyMMdd format and I want dd.MM.yyyy
I get this error with my code
java.lang.IllegalArgumentException: Cannot format given Object as a Date
String date = "20190226";
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
date = sdf.format(date);
Any help?