Filter a recent date from duplicate data

Hi,

Hope the following sample helps you.

img20211212-2

dt = dt.AsEnumerable.GroupBy(Function(r) r("Name").ToString).Where(Function(g) g.Count>1).Select(Function(g) g.OrderByDescending(Function(r) DateTime.Parse(r("Date").ToString)).First).CopyToDataTable

Sample20211212-1.zip (2.6 KB)

Regards,

1 Like