see the below example . even if you have data in character values this works albite it gives note in log.(first 2 examples work)
unless some of your does not make date, which cause this issue. check the examples in code below
data want;
mnth = 1;
d = 2;
yr =2016;
newdate=mdy(mnth,d,yr);
format newdate mmddyy10.;
run;
data want1;
mnth = "1";
d = "2";
yr ="2016";
newdate=mdy(mnth,d,yr);
format newdate mmddyy10.;
run;
/* this will not work because there is 13 as month and result in . and you have note in
log NOTE: Invalid argument to function MDY(13,2,2016) at line 77 column 9.*/
data want3;
mnth = 13;
d = 2;
yr =2016;
newdate=mdy(mnth,d,yr);
format newdate mmddyy10.;
run;
... View more