To filter the column with only dates and find the latest date from the column

for example -

Give a try at

myMaxDateTime =

(From d In YourDataTableVar.AsEnumerable
Where DateTime.TryParseExact(d("Column1").toString.Trim, "MM-dd-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, Nothing)
Let  x = DateTime.ParseExact(d("Column1").toString.Trim, "MM-dd-yy", CultureInfo.InvariantCulture)
Select v = x).Max(Function (x) x)

error : the sequence contains no elements in assign activity

Please provide a workflow

please share a screenshot from your implementation. Ensure that you have modified that LINQ and it is using the variable names from your implementation

check this

check your date format. the sample from above is maybe different - vs . seperator. Otherwise debug and check within the immediate panel some sample values of the datatable

Got it sorry it was seperated by (Dot.)
but one more scenario…
I wil provide a screenshot of webpage
from that i need to click the latest file if exist or the latest folder

lets scope 1 topic = 1 case.
Initial you requested to filterout all non date values and find the latest date. When this case is solved then close the topic. Thanks

Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

For the other question just open a new topic with a clear case description

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