Excercise is to have below output -
02/06/2021
02/08/2021
02/10/2021
02/12/2021
Startdate 02/06/2021
Enddate 20/12/2021
Noofintervals 2 months
any idea to achieve this?
Discussion posts and replies are publicly visible
Try this out for size. The edate() function is useful for adding straight months.
a!localVariables( local!startDate: date(2021,06,02), local!endDate: date(2021,12,20), local!monthIntervals: 2, local!monthsBetween: month(local!endDate)-month(local!startDate)+12*(year(local!endDate)-year(local!startDate)), { local!startDate, reject( rule!APN_isEmpty, a!forEach( items: 1+enumerate(local!monthsBetween), expression: if( mod(fv!index,local!monthIntervals)=0, edate(local!startDate,fv!item), null ) ) ) } )
Hi Chris .. how are you doing?
I have a scenario where in I have 2 columns in grid, start date and end date. I need to identify first row end date and populate the same value as second row start date and so on while constructing the cdt for auto populating the grid rows, any thoughts from your end please?
Start Date End Date
1st row Jan/01/2021 Mar/01/2021
2nd row Mar/01/2021 May/01/2021
3rd row May/01/2021 Jul/01/2021
So i'm facing problem in identifying index of previous row end date value and map it with new cdt creation.
Please help if possible. Thank you!