直接上代码hiahiahia
%macro yourdays(birthday=);
ods listing close;
ods html;
data _null_;
file print;
time=time();
y=today();
x=&birthday;
year=Intck('year',x,y);
qtr=Intck('qtr',x,y);
month=Intck('month',x,y);
week=Intck('week',x,y);
day=Intck('day',x,y);
put 100*'*';
put "现在是"y:yymmdd10."号" time:time5."分。";
put;
put "截止到目前,小肖在这个世界上活了"year"年,"
month"个月," week"个星期," day"天。";
put;
put "希望20岁的自己天天开心~~";
put;
put 100*'*';
run;
ods html close;
ods listing;
%mend;
/*将以下日期改为生日,直接运行全部程序~~~*/
%yourdays(birthday='01Apr1999'd);