For mysql I wrote a query like
SELECT * FROM mytable GROUP BY DATE(dateTimeField)
But i can\'t use the DATE() function in JPQL
DATE()
I'm afraid that's beyond the scope of what JPQL offers. You will have to resort to native queries.
Here's the List of available functions in JPQL:
Java EE Tutorial 6 > Persistence > JPQL > Functional Expressions