This is the first time I have used a Loop control function so I am guessing as to how it is suppose to work. Basically, I am taking a From and To parameter and trying to find out how many work days there are between the two dates; however, I need to filter out weekends. I figured I could do this with a loop, but if there is an easier way to do this please let me know.
This is the code I came up with. I seem to be getting the error 'missing key word do'
Code:
dateVar x;
x:=({?From});
while ((dayofweek((x),crSunday)<>1) and (dayofweek((x),crSunday)<>7)=true) and (x<{?To})) do
(count(x:=x+1))
exit while;
This is the code I came up with. I seem to be getting the error 'missing key word do'
Code:
dateVar x;
x:=({?From});
while ((dayofweek((x),crSunday)<>1) and (dayofweek((x),crSunday)<>7)=true) and (x<{?To})) do
(count(x:=x+1))
exit while;