문제

quick question here.

How could I adapt this code so that it would work with %let DTD=2012-12-31;

%let DTD=31-DEC-2013;

DATA _Null_;
dd="&DTD"d;
put dd;
RUN;

Then dd has a value of 19723. Thanks in advance !

도움이 되었습니까?

해결책

You would have to use INPUT instead of "&var"d;

dd = input("&DTD",yymmdd10.);

Now, hopefully you wouldn't use 2012-12-32, since that's not a real date. :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top