I need to put a loop on a LOAD statement with the following requirements:
A start & end date are defined as non-changing values
The loop needs to update 2 other variables which I need to include into the load statement
Variable 1: The 1st day of the month (in yyyy-mm-dd format)
Variable 2: The last day of the month (also in yyyy-mm-dd format)
The loop needs loop through all months starting with the month of the "startdate" and ending with the month of the "enddate" and generate the first and last day of each month into the variables (as described above)
End date: 2013-11-07
Values I want to generate in the first loop:
Values I want to generate in the second loop:
etc etc..., ending with in the last loop:
I was able to do this crawling through the loop day by day, using the formula below, but I'm unable to do the same to loop through the months:
for zi = date(vStartDateGA,'YYYY-MM') to date(vEndDateGA,'YYYY-MM')
Do you mean variables or fields? If you create a loop that changes the value of a variable in each iteration then after the loop ends you will still have only one variable that will have only one value.
Actually, why don't you start by explaining what your source data is and what the end result is that you're looking for.