我现在想利用身份证号推算人的年龄,该如何编程呢?
我的程序比较麻烦,看看能不能帮我简化一下:
data m;
format cust_id $18. birth date9.;
input cust_id $18.;
birth=mdy(input(substr(cust_id,11,12),$2.),input(substr(cust_id,13,14),$2.),input(substr(cust_id,7,10),$4.));
cards;
150422193810130044;
run;