I have to find the nearest Date from a datatable
i have to find the nearest less than date i.e image1 date
Hi @Manish_Talele
Few steps that you can follow
- Use a read range to read the excel onto a datatable
- Use sort data table and sort the data in ascending order using the date column
- Have the date you want to check in a separate variable
- Loop through the datatable using a for each row
- Within the loop, use a If condition to check whether the date in the data table row is less than the date you check
- If true, assign the date to another variable
- On the else condition of the if activity, add a break activity so that as soon as the condition doesnt match, we exit the loop.
By the time you exit, you have the nearest closest day
Hope it helps
1 Like
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.