In mysql database I have a table named bug_list
tables name: bug_list
id projectId created_date
1 5 2012-06-30 13:30:57
2 5 2012-07-30 10:30:58
3 5 2012-07-30 12:30:44
4 5 2012-07-31 13:30:14
5 5 2012-07-31 14:30:32
I want to sort it by month (like jan, feb… ) in the first result,
sort it by week day (like mon, tue, wed) in the second result
and sort it by hour (like 2hrs range say 8-10am, 10-12pm….) in the third result
I can’t understand from criteria query. Can somebody explain how to resolve this issue?
HERE you can find something useful.
Start by extending Hibernate Order class:
Then use some SQL formula: