I am using java to convert string to date but this exception occur. here is my program code:
String[] split = invoice.split("-");
String padded = null;
SimpleDateFormat formatter = new SimpleDateFormat("YYYYMMDD");
Date date = formatter.parse(split[0]);
here is the Exception:
java.text.ParseException: Unparseable date: "20200302"