title: Compare date without time
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1439779/how-to-compare-two-dates-without-the-time-portion">How to compare two Dates without the time portion?</a>  </p>
  </blockquote>
  
  
  
  <p>How to compare date without time in java ?</p>
  
  <pre><code>Date currentDate = new Date();// get current date           
  Date eventDate = tempAppointments.get(i).mStartDate;
  int dateMargin = currentDate.compareTo(eventDate); 
  </code></pre>
  
  <p>this code compares time and date !</p>