How to identify from table which is latest date

Hi Team,

I have one table and from that table we have to identify which is latest date.
|Final date | Name|

|5/7/2024 (mm/dd/yy) |Abc|
|1/5/2024(mm/dd/yy) |bhv|
|9/7/2024 (mm/dd/yy) |xyz|
|5/1/2023 (mm/dd/yy) |ghj|
|5/3/2024 (mm/dd/yy) |yhu|

Please refer above table & let me know How to identify latest date?
Please help me.

try this in a assign activity

dt.AsEnumerable().OrderByDescending(Function(r) DateTime.ParseExact(r("Final date").ToString(), "M/d/yyyy", Nothing)).First()("Final date").ToString()

Hi @Smitesh_Aher2

Try this LINQ Expression:

latestDate = dt.AsEnumerable().OrderByDescending(Function(r) DateTime.ParseExact(r("Final date").ToString(), "M/d/yyyy", Nothing)).First()("Final date").ToString()

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.