num_day=datdif(sdate,edate,'act/act');
where
sdate=start date
edate=end date.
eg:
data a;
sdate='21jan2008'd;
edate='31dec2010'd;
num_day=datdif(sdate,edate,'act/act');
put _all_;
run;
sdate=17552 edate=18627 num_day=1075 _ERROR_=0 _N_=1
NOTE: The data set WORK.A has 1 observations and 3 variables.
1 comment:
If edate=today() then the number of days will be until today.
Post a Comment