📜  c# groupby date - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:02.833000             🧑  作者: Mango

代码示例1
yourDateList.GroupBy(i => i.ToString("yyyyMMdd"))
             .Select(i => new
             {
                 Date = DateTime.ParseExact(i.Key, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None),
                 Count = i.Count()
             });