Check if a last modification date has changed since last run of robot

Hi Everybody,

I’m currently developing a robot and i want to check if the last modification date has changed since the last execution.

I already have extracted all the file names and the last execution date and i want to see if at least one of them has been modified since the last run.

I have two datatables with, in the first column is name file and in the second column is last modification date. (as shown in the image)

dt1 :
image

dt2 :
image

I would like to find a method which check if at least one of the date has changed in the two datatables.

Thank you ! :slight_smile:

Hi @guillaume.cabanes2 ,

Since the ask is for a Check, we could use the below Steps to get it as a True or False case :

  1. Use Join Datatables activity to get the Combined datatable with both the data in a Single Datatable, the output datatable let it be named JoinedDT. Here, also we assume there will be same data in both so an Inner Join type is assumed.

  2. Next, we can just check if the Date Columns or Column2 & Column2_1 or Indices 1 & 3 in the JoinedDT has equal values or not.

  3. Below Expression outputs True or False if there is any row which does not have the equal dates.

JoinedDT.AsEnumerable.Any(Function(x)Not (x(1).ToString.Equals(x(3).ToString)))

It works well thank you !

1 Like

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