score:1

select grouped.Sum(m => (m.MinutesSpent ?? 0)).ToString()

score:1

var TotalMinutesSpentGroupedList = timelabels
         .GroupJoin(challengedetails,
                    t => date,
                    cd => createddate,
                    (t,cd) => new 
                    { 
                       MinutesSpent = cd.minutesspent ?? 0,
                       CreateDate = cd.createddate ?? DateTime.Now
                    })
         .SelectMany(tcd=> challengedetails.DefaultIfEmpty(),
                     (t, cd) => new 
                     { 
                        MinutesSpent = cd.minutesspent ?? 0,
                        CreateDate = cd.createddate ?? DateTime.Now
                     })
         .Select(s => new 
                     { 
                        MinutesSpent = cd.minutesspent ?? 0,
                        CreateDate = cd.createddate ?? DateTime.Now
                     })
         .GroupBy(g => g.createddate).Select(item => item.Sum(s => s.minutesspent));

Related Query

More Query from same tag