EntityFunctions.TruncateTime linq 时间转化操作
var _date = DateTime.Now.Date; var q = from p in AdDividend.ObjectSet() where EntityFunctions.TruncateTime(p.SettlementDate) == _date group p by p.UserId into g select new { g.Key, DayMaxGold = g.Sum(p => p.GoldNum) }; if (q != null) { _DayMaxGold = q.Max(c => c.DayMaxGold); }
时间: 2024-10-25 08:41:25