I cannot find any good reference to this. I have a lot of data in SQL with dates. So I wanted to make a line chart to display this data over time. If I want to show this in a few days, I need to group the days ... But LOGDATE is the full date .. not DAY ..
So, I have this below, but LINQ does not know what DayOfYear property is ...
var q = from x in dc.ApplicationLogs
let dt = x.LogDate
group x by new { dayofyear = dt.Value.DayOfYear } into g
select new
{
iCount = g.Count(),
strDate = g.Key
};
source
share