How to split dates in a month with 5 days Interval

I am trying to get the calendar dates with interval based on the current date. For example if current date is less that 5th, then My start date should be 1 and end date will be 5th. I will be pulling data for these dates.
if current date falls between 6th to 10th, Then I need to select the calendar with 2 intervals ( 1 to 5th and 6th to 10th)
If current date falls between 10th to 15th, Then I need start date and end date with three intervals( 1 to 5, 6 to 10, 11 to 15)
and so on till the month end.
This is because My application has data limitation and cannot pull all the records in single selection of dates. So I am planning to pull data with each interval and add data to datatable. May I know how can we achieve the date intervals.

Hi @ashok.p ,

Please check this link . It might be helpful .

1 Like

Find starter help here:
GetFull5BlockSegementsOfMonth_ByDate_V2.xaml (7.0 KB)

1 Like