I am trying to parse a string "Sunday, July 4, 2021"
to LocalDate
as the following:
string this.selectedDate = "Sunday, July 4, 2021";
LocalDate date = LocalDate.parse(this.selectedDate);
But I am getting this error:
java.time.format.DateTimeParseException: Text 'Sunday, July 4, 2021' could not be parsed at index 0
How can I convert such a string full date to the LocalDate?