I've the following query
var x = from t in v
group t by t.Time.Year + "-" t.Time.Month + "-" +
t.Time.Day + " " t.Time.Hour + ":" + t.Time.Minute into g
select new { Tag = g.Key, Frequency = g.Count() };
t.Time is a DateTime. The above smells a bit i.m.o. Are there any clean way to group by intervals based on DateTimes ?
Edit: What I don't quite like about this is the string fiddling and producing a string. Ideally I'd like to produce a DateTime out of the group, not a string.