i have the following script
FOR i = 0 to 12
LET vMonthT = MONTH(ADDMONTHS($(vToday),-$(i)));
LET vMonthN = NUM(MONTH(ADDMONTHS($(vToday),-$(i))));
LET vYearT= YEAR($(vToday));
//LET vYearT = YEAR(ADDMONTHS($(vToday),-$(i)));
MONTHNAME(MAKEDATE($(vYearT),$(vMonthN),1)) as SALESMONTH,
SUM(SRDAYS) as SRDAYS
WHERE EXISTS(BRNO) AND YEAR(BHDATE) = '$(vYearT)' AND MONTH(BHDATE) = '$(vMonthT)' AND
BHDATE < $(vToday)
GROUP BY BRNO;
LET vMonthT =;
LET vYearT =;
from the above script how can i get SRDAYS for current month alone. (SRDAYS will vary according to theBRNO. it is nothing but the working days)
i have already set some variables to define current date,year,month......previous months,years.....
Please assist me in fixing this issue asap.