title: Java calendar get the current date, without hours, minutes, seconds and milliseconds, in milliseconds
body: <p>I would like to get the current date in milliseconds with only year, month and date. But when I use this code:</p>
  
  <pre><code>Calendar cal = Calendar.getInstance();
  cal.clear(Calendar.HOUR);
  cal.clear(Calendar.MINUTE);
  cal.clear(Calendar.SECOND);
  cal.clear(Calendar.MILLISECOND);
  currentDate = cal.getTimeInMillis();
  </code></pre>
  
  <p>I still get the time in milliseconds with the hour. 
  How can I fix this?</p>