I have a collection of rows where the DateTime is not correct.
Is it possible to correct them with Regex.Replace?
Wed2,8-Jul-21 64 53,0 57
Thu2, 9-Jul-21 73 60,0 48
Fri, 30-Jul-21 86 70,0 36
Sat,31-Jul-21 84 69,0 38
Sun0, 1-Aug-21 89 73,0 33
Mon0,2-Aug-21 98 80,0 24
Tue0, 3-Aug-21 91 75,0 31
Wed0,4-Aug-21 92 75,0 30
foreach (var row in rows)
{
Regex rg = new Regex([pattern]);
rg.Replace(row, [replacement]);
}
The wrong data is in the dateTime value; see below:
This is not correct: Wed2,8-Jul-21
The correct value is: Wed,28-Jul-21
Also, This is not correct: Thu2, 9-Jul-21
The correct value is: Thu,29-Jul-21