In Criteria API i have to group the results of a query based on the day part of a date column returned in the query. Can you please suggest how to do this?
The following is the multiselect query
cq.multiselect(root.get("id"), root.get("recievedOn")) ;
where recievedOn is the date column. I want to groupBy the query based on the day, week, month and year. Can you please suggest how to do this.