title: What is the easiest way to get the current date in YYYYMMDD format?
body: <p>And how to print it as a string.</p>
  
  <p>I tried this but I get the date in (YYYMMMMDDD HHSSMM) format:</p>
  
  <pre><code>System.out.println(LocalDateTime.now());
  </code></pre>
  
  <p>What is the easiest way to get the current date in (<strong><em>YYYYMMDD</em></strong>) format?</p>