title: How to get midnight of given date?
body: <p>I need to know how to get current midnight from date. </p>
  
  <p>For example I get "15.06.2012 16:40:20" and i need "15.06.2012 00:00:00".</p>
  
  <pre><code>public List&lt;Game&gt; getGamesByDate(Date day) throws SQLException {
  
      final Date startDate = day;
  
      //here I need to convert startDate to midnight somehow
  
      final Date endDate = new Date(day.getTime() + (23 * HOUR) + (59 * MINUTE));
      final List&lt;Game&gt; games = gameDAO.getGamesByDate(startDate, endDate);
  
      return games;
  
  }
  </code></pre>