title: Get only the date from the timestamp
body: <p>This is my Below function in which I am passing timestamp, I need only the date in return from the timestamp not the Hours and Second. With the below code I am getting-</p>
  
  <pre><code>private String toDate(long timestamp) {
          Date date = new Date (timestamp * 1000);
          return DateFormat.getInstance().format(date).toString();
  }
  </code></pre>
  
  <p>This is the output I am getting.</p>
  
  <pre><code>11/4/01 11:27 PM
  </code></pre>
  
  <p>But I need only the date like this</p>
  
  <pre><code>2001-11-04
  </code></pre>
  
  <p>Any suggestions?</p>