title: Extracting date from timestamp in HQL for comparison in a where clause
body: <p>I want to extract (year, month, dayOfMonth) from a timestamp field using HQL for comparison in a where clause.</p>
  
  <p>Example:</p>
  
  <pre><code>Query hibernateQuery = session.createQuery("select sum(t.amount) from Transaction t " + 
    "where extract_date(t.timestampField) = :date");
  
  hibernateQuery.setParameter("date", LocalDate.of(2018, 10, 11));
  
  System.out.println( hibernateQuery.getSingleResult() );
  </code></pre>
  
  <p>So I am looking for a function like this pseudo function <code>extract_date(t.timestampField)</code> that I've used in example above.</p>