title: Hibernate format date in order by
body: <p>In my datebase, I have defined a timestamp field named "creation_date".<br>
  What I'm trying to do is to have a query like this :</p>
  
  <pre><code>SELECT * FROM table_name ORDER BY date(creation_date) desc
  </code></pre>
  
  <p>My code is defined as it is (relevant parts only) :</p>
  
  <pre><code>Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
  Criteria crit = session.createCriteria(TableClass.class);
  crit.addOrder(Order.desc("date(creationDate)");
  return crit.list();
  </code></pre>
  
  <p>but this results in an Hibernate exception ...</p>
  
  <p>Thanks for any help</p>
  
  <p>EDIT : 
  creation_date holds "2015-08-17 15:01:37" but I want to order by DATE(creation_date) to only keep "2015-08-17"</p>