i am considering the data is stored in a datatable dt
create a date_iter variable of type (datetime)
dt_clone=dt.clone()
assign date_iter=Now.date
while (dt_clone.rows.count<2):
assign list_rows=New List(Of Datarows)
assign date_iter=date_iter.adddays(1).date
list_rows=dtasenumerable.where(Function(x)
Convert.ToDateTime(x("Date").tostring).equals(date_iter)).tolist
if list_rows.count>0:
(add data row) to dt_clone , add the list_rows first value (0)
Now here In the First Scenario The dates are 7th, 8th and 9th So When I Run the Bot on 7th June it should print the date 8th and 9th
In the Second Scenario The dates are 7th, 8th, 10th So When I run the bot on 7th June It should print the date 8th and 10th June because 9th is not available and I need to print 2 ahead dates
Same in the third scenario as you can see 8th and 9th isn’t available So it should jump ahead and capture the dates 10th and 11th
And lastly Same as in fourth Scenario 8th and 9th and 11th dates aren’t available so it will search for 2 dates ahead so it will capture 10th and 12
So basically I need to capture the two immediate dates from the current date
Now here In the First Scenario The dates are 7th, 8th and 9th So When I Run the Bot on 7th June it should print the date 8th and 9th
In the Second Scenario The dates are 7th, 8th, 10th So When I run the bot on 7th June It should print the date 8th and 10th June because 9th is not available and I need to print 2 ahead dates
Same in the third scenario as you can see 8th and 9th isn’t available So it should jump ahead and capture the dates 10th and 11th
And lastly Same as in fourth Scenario 8th and 9th and 11th dates aren’t available so it will search for 2 dates ahead so it will capture 10th and 12
So basically I need to capture the two immediate dates from the current date