Michaeljep
(Michael Jeppesen)
1
Hi
In Excel I would use a matrix formula and a max value, but how is it done in Uipath
I need to find the newest date in a datatable with several entries on item numbers
90000035 27-10-2014 957
90001856 27-06-2011 960
90001856 21-12-2015 975
90001856 18-03-2016 970
90019693 14-03-2016 1015
90019693 12-12-2015 1010
The three lines I’m trying to keep is the ones marked in bold.
They are the newest unique ones in the dt.
Yoichi
(Yoichi)
2
Hi,
Can you try the following sample?
dt = dt.AsEnumerable.GroupBy(Function(r) r(0).ToString).Select(Function(g) g.OrderBy(Function(r) DateTime.ParseExact(r(1).ToString,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture)).Last()).CopyToDataTable()
Ssample20220106-2.zip (8.8 KB)
Regards,
arivu96
(Arivazhagan A)
3
dt.Select("",[Date] desc").CopyToDataTable()
Regards,
Arivu
Michaeljep
(Michael Jeppesen)
4
Hi
Yoichi’s solution worked very fine, so haven’t checked the other proposal.
Thanks both for your time and help. Extremely appreciated.
Best regards
1 Like
system
(system)
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.