<p>I've got an application that uses a hibernate(annotations)/mysql combination for ORM. In that application, I got an entity with a Date field. I'm looking for a way to select on that date within a time range (so <code>hh:mm:ss</code> without the date part). </p>

<p>In MySQL there's a function <code>TIME(expression)</code> that can extract the time part and use that in the where clause, but that does not seem to be available in Hibernate without switching to native queries. Is there an option in hibernate to do this, or should I loop through the results in java and do the comparison there? Would this be much slower as the MySQL solution, since that would not use indexes anyway?</p>

The following functions are available in HQL, maybe you could use them:
```
second(...), minute(...), hour(...), day(...), month(...), year(...)
```