I am using the below code to convert a date in String :
String strDate="Thu Aug 09 16:01:46 IST 2018";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
LocalDateTime dateTime = LocalDateTime.parse(strDate,formatter);
I am getting the below exception :
java.time.format.DateTimeParseException: Text 'Thu Aug 09 16:01:46 IST 2018' could not be parsed at index 0
The format in the variable 'strDate' will be same and cannot be modified as i will be getting that from a different application