title: Java: Unable to obtain LocalDate from TemporalAccessor
body: <p>I am trying to change the format of a <code>String</code> date from <code>EEEE MMMM d</code> to <code>MM/d/yyyy</code> by, first, converting it into a <code>LocalDate</code> and then applying a formatter of a different pattern to the <code>LocalDate</code> before parsing it into <code>String</code> again. </p>
  
  <p>Here's my code:</p>
  
  <pre><code>private String convertDate(String stringDate) 
  {
      //from EEEE MMMM d -&gt; MM/dd/yyyy
  
      DateTimeFormatter formatter = new DateTimeFormatterBuilder()
              .parseCaseInsensitive()
              .append(DateTimeFormatter.ofPattern("EEEE MMMM d"))
              .toFormatter();
  
      LocalDate parsedDate = LocalDate.parse(stringDate, formatter);
      DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("MM/d/yyyy");
  
      String formattedStringDate = parsedDate.format(formatter2);
  
      return formattedStringDate;
  }
  </code></pre>
  
  <p>However, I get this exception message that I don't really understand: </p>
  
  <pre><code>Exception in thread "main" java.time.format.DateTimeParseException: Text 'TUESDAY JULY 25' could not be parsed: Unable to obtain LocalDate from TemporalAccessor: {DayOfWeek=2, MonthOfYear=7, DayOfMonth=25},ISO of type java.time.format.Parsed
      at java.time.format.DateTimeFormatter.createError(DateTimeFormatter.java:1920)
  </code></pre>