Fixed date sorting in YieldStatistics.cs to sort the dates as datetimes instead of as strings.

This commit is contained in:
Infineon\StieberD
2023-11-10 09:34:10 -07:00
parent 6c8788dae5
commit 7b1c044730
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
using ReportingServices.Shared.Models.ProductionReport;
using System.Collections.Generic;
using System.Linq;
namespace ReportingServices.Shared.ViewModels.ProductionReport;
@ -49,7 +51,7 @@ public class YieldStatistics
}
dateTimes.Sort();
dates.Sort();
dates = dates.OrderBy(x => DateTime.Parse(x)).ToList();
DateTime currentDateTime = dateTimes.ElementAt(0);
for (int i = 1; i < dateTimes.Count; i++)