title: Group by date in column which stores timestamp in long(bigint)
body: <p>I want to fetch count from table per day but the time column is in long so I can not just simply group by time column. I have to group by date in time column. How can I do this?</p>
  
  <p>Table:</p>
  
  <pre><code>Column   |  type
  ----------------
  id       |  Long (bigint)
  name     |  String (varchar)
  time     |  Long  (bigint)
  </code></pre>
  
  <p>I have try following query but it doesn't work as I have time in long and I want to group by date.</p>
  
  <pre><code>select time,count(*) from my_table mt group by time;
  </code></pre>
  
  <p>How can I group by date in above query?</p>
  
  <p>One more thing I'm going to use this query in hibernate so need a query that can also be written in hql.</p>