title: How to transform a time value into YYYY-MM-DD format in Java?
body: <p>How can I transform a time value into YYYY-MM-DD format in Java?</p>
  
  <pre><code>long lastmodified = file.lastModified();
  String lasmod =  /*TODO: Transform it to this format YYYY-MM-DD*/
  </code></pre>