title: How to convert an Instant to a date format?
body: <p>I can convert a <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Date.html"><code>java.util.Date</code></a> to a <a href="http://docs.oracle.com/javase/8/docs/api/java/time/Instant.html"><code>java.time.Instant</code></a> (Java 8 and later) this way:  </p>
  
  <pre><code>Calendar cal = Calendar.getInstance();
  cal.set(Calendar.HOUR_OF_DAY, 8);
  cal.set(Calendar.MINUTE, 30);
  Date startTime = cal.getTime();
  Instant i = startTime.toInstant();
  </code></pre>
  
  <p>Can anybody let me know about the convert that instant to date with a specific date &amp; time format? i.e 2015-06-02 8:30:00</p>
  
  <p>I have gone through api but could not find a satisfactory answer.</p>