I want to extract (year, month, dayOfMonth) from a timestamp field using HQL for comparison in a where clause.
Example:
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() );
So I am looking for a function like this pseudo function extract_date(t.timestampField)
that I've used in example above.