I have FromDate and ToDate paramersts on my report. How to find month numbers from fromDate to Todate? e.g.
User entered from date as 5/6/2010 and to date as 12/30/2010; then I want 5,6,7,8,9,10,11,12 in an array.
numbervar st := month({?FromDate});
numbervar end := month({?ToDate});
numbervar array mos;
numbervar i;
numbervar j := end-st+1;
for i := 1 to j do (
redim preserve mos[j];
if st+i=1 <= 12 then
mos := st+i-1 else
if st+i-1 <= 24 then
mos := st+i-13 else
if st+i-1 <= 36 then
mos := st+i-25 //etc.
);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.