I have a table with a datetime field. I want to retrieve a result set grouped by the month/year combination and the number of records that appear within that month/year. H
you could also do it this way
from o in yg group o by o.OrderDate.ToString("MMM yyyy") into mg select new { Month = mg.Key, Orders = mg }
Your result will be
{Jan 2014, 25} {Feb 2015, 15} etc...