Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
%macro IntCheck(IDate1 = '01feb2001'd,
IDate2 = today(),
IntCheck = 01/01,
YourMacroVarName = NumberOfIntvls);
%global &YourMacroVarName;
data _null_;
length
int1
int2 $2;
int1 = scan("&intcheck",1,'/');
int2 = scan("&intcheck",1,'/');
do Ix= &IDate1 to &IDate2;
Iy = scan(put(Ix,mmddyy10.),1,'/');
Iz = scan(put(Ix,mmddyy10.),2,'/');
if trim(Iy) = trim(int1) and
trim(Iz) = trim(int2) then
ctr+1;
end;
call symput("&YourMacroVarName",trim(left(put(ctr,8.))) );
run;
%mend IntCheck;
data _null_;
format date1 date2 ddmmyy10.;
date1 = '01AUG2004'd;
date2 = '15OCT2005'd;
put date1=;
put date2=;
* Count number of 01JANs that appear in range *;
jans = intck('YEAR',date1,date2);
put jans=;
* Count number of 01OCTs that appear in range *;
octs= intck('YEAR.10',date1,date2);
put octs=;
run;