I group my data by hour like this:
group c by new { date = new DateTime(Date.Year, Date.Month, Date.Day, Date.Hour, 5, 0), name = c.Name } into g
I want to get something like this : 10.05 - 11.05 When I debugged the code Date is returned like my expected. But data is still groupped between 10.00 - 11.00.
I hope I can explain.What is the logic to do this?
Thanks.
1 Answer