Hi,
For some time now we can use date and time function in queries to extract part of date time (from documentation):
YEAR({d '2011-12-31'}) is evaluated to 2011.
MONTH({d '2011-12-31'}) is evaluated to 12.
DAY({d '2011-12-31'}) is evaluated to 31.
HOUR({t '23:59:00'}) is evaluated to 23.
MINUTE({t '23:59:00'}) is evaluated to 59.
SECOND({t '23:59:00'}) is evaluated to 0.
Quite often I have to group by date(). For few queries I was concatenating 'date' from year()-month()-day() calls, but this method is quite error prone and final queries are terrible to read. My question is - is it possible to add one more method to above list - date() - that will return only date from java.util.Date field?