Time management
- 2 ответа
- 0 вопросов
6
Вклад в тег
var results = from c in clients
let elapsedMonths = (DateTime.Now.Year * 12 + DateTime.Now.Month) - (c.Year * 12 + c.Month)
select new
{
Year = c.Year,
Month = c.Month,
Elapsed = elapsedMonths > 0 ? elapsedMonths * c.TotalHours : 0
};