title: How to convert a string to date in Thymeleaf?
body: <p>I have the following input:</p>
  <pre><code>&lt;input name=&quot;dateOfOrder&quot; class=&quot;form-control&quot; id=&quot;dateOfOrder&quot; type=&quot;date&quot; th:field=&quot;*{{dateOfOrder}}&quot; /&gt;
  </code></pre>
  <p>And oh this is the fragment of the DTO into which they are inserted :</p>
  <pre><code>@DateTimeFormat(pattern=&quot;yyyy-MM-dd&quot;)
  private LocalDate dateOfOrder;
  </code></pre>
  <p>Unfortunately I get an exception:</p>
  <blockquote>
  <p>Failed to convert from type [java.lang.String] to type
  [java.time.LocalDate] from value '2022-06-14'; nested exception is
  java.lang.IllegalArgumentException: Parse attempt failed from value
  [2022-06-14].</p>
  </blockquote>
  <p>I`m not proficient in Thymeleaf and would like some hints on what is wrong here</p>