Can I get items created at specified hour (e.g. 9am) from the table using by hibernate restrictions (i mean ids 130, 146, 147, 148)?
Can you tell me how (createDate
is in Calendar
format in Java)?
Can I get items created at specified hour (e.g. 9am) from the table using by hibernate restrictions (i mean ids 130, 146, 147, 148)?
Can you tell me how (createDate
is in Calendar
format in Java)?
Does it have to be done using Restrictions? Can't you use something else? If yes then you should be able to do it with something like this:
Restrictions.sqlRestriction("DATEPART(hour,createDate) = 09")
Not sure about the 0 in 09 and didn't test it myself but don't see why it shouldn't work.