Domanda

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 !

È stato utile?

Soluzione

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. :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top