Need some help on this. I have a list that looks like this:
List<InvoiceCalc> this has the following properties:
- has other fields not listed here...
I think have another list as follows:
List<TotalInvoiceCalc> this has the following properties:
What I need to do is I need to GroupBy the following:
- Sum (CalcAmount)
Essentially I need to ignore the day of the dates.
Then I need to insert into the List<TotalInvoiceCalc> the 1st Day of the PeriodStartDate Month and Year and the Last Day of the PeriodEndDate Month and Year.
i.e. int days = DateTime.DaysInMonth(PeriodEndDate.Year, PeriodEndDate.Month);
Then put together the PeriodEndDate with the Month, days and Year.
Hope this makes sense.
Thanks all for any help