title: Get 1 year back dateTime from current dateTime in yyyy-MM-dd HH:mm:ss.SSS format
body: <p>I need to get the datetime of 1 year back considering the current datetime. The format needed to be in &quot;yyyy-MM-dd HH:mm:ss.SSS&quot;</p>
  <ul>
  <li>ex : 2019-08-13 12:00:14.326</li>
  </ul>
  <p>I tried following. But getting an error.</p>
  <pre><code>LocalDate now = LocalDate.now();
  LocalDate localDate = LocalDate.parse(now.toString(), DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd HH:mm:ss.SSS&quot;)).minusYears(1);
  </code></pre>
  <p>Below Exception returned:</p>
  <blockquote>
  <p>DateTimeParseException: Text '2020-08-13' could not be parsed</p>
  </blockquote>
  <p>What's the best way to do this in Java 8+ ?</p>