I want to generate list of weekwise dates between start date and end date taking monday as start of the week and sunday as end of the week. If month end comes then it should end with date and for the next month it should start new record. I tried writing using Datefirst but it was not working as set operator was not working in function.
For Example StartDate = '04-08-2022' (DD-MM-YYYY),
End Date = '08-09-2022'
The desired output as below
04-08-2022 08-08-2022
09-08-2022 15-08-2022
16-08-2022 22-08-2022
23-08-2022 29-08-2022
30-08-2022 31-08-2022
01-09-2022 04-09-2022
05-09-2022 08-09-2022