How Get Months with two Dates 01/01/2023 to 01/04/2023

Hi, if I got two Dates like 01/01/2023( January ) to 01/04/2023 (April ). where I need to Click a check box of January , February , March , April.

@sayed.tabrez

You can check the checkbox selector if you can pass the same which you are expecting?
If possible share the selector of the checkbox

Thanks,
Srini

@sayed.tabrez

You can try this using loop

Here currentdate - 01/01/2023
Enddate - 01/04/2023

Use a while loop with condition as currentdate <= enddate

Inside loop use currentdate.ToString("MMMM") - this would give the month

And after this use currentdate = currendate.Addmonths(1)

So for each iteration you would get the month till final date

Cheers

1 Like

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