format date_new mmddyy10.;
date_new =input(trim(VAR1),mmddyy10.);
代码无效。
1 个答案:
答案 0 :(得分:0)
试试这个:
data new;
set old;
/* Parse character date components */
array dt[*] month day year;
do i = 1 to 3;
dt[i] = input(scan(var1, i, "/"), best.);
end;
/* Recontruct date */
date_new = mdy(month, day, year);
format date_new mmddyy10.;
run;