Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using date part of a datetime in group by clause

 
Alexander Curvers
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since i inherit a java.util.date from parent entity i use this field but i want to group by the date part (not time) (for daily avarage)
how can i best do this
 
Benjamin Winterberg
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should be possible by using HQL date functions:

second(...), minute(...), hour(...), day(...), month(...), and year(...)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic