How to select line based on date filter?

Hi guys, I screen scraped the information in the white box in a data table. How can I compare each line’s date and time should be between datetime1 and datetime2 and if it is I need to click on that line containing that date in the white box. Please advise.


Loop through the table, do the comparison using an if statement (if date>datetime1 and date<datetime2), then use the click activity and use a custom selector (like the table row no, get the index of the loop and use as the row no to click).

1 Like

Hello @Anived_Mishra

For Each row In dt.Rows
currentDate = DateTime.ParseExact(row(“DateColumn”).ToString, “MM/dd/yyyy HH:mm:ss”, CultureInfo.InvariantCulture)

If currentDate >= datetime1 AndAlso currentDate <= datetime2
     Add activities to click or interact with the corresponding line
     For example:
     Click Activity
     Type Into Activity

Thanks & Cheers!!!

1 Like

Hey @Anas-p-v I was able to compare however since the information in the white box doesn’t have a row attribute, it only has name, I am not able to click on the correct row. Is there a workaround?


Hey @Anas-p-v never mind, I was able to make use of name variable. However, I realized it clicks on the row but doesn’t select it, is there a different activity apart from click that will select a row?

Click Text Worked. Thanks all!

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