data ss;
input a$12. b$13.;
ayear=substr(a,1,4);
amon=substr(a,5,2);
aday=substr(a,7,2);
ahh=substr(a,9,2);
amm=substr(a,11,2);
byear=substr(b,1,4);
bmon=substr(b,5,2);
bday=substr(b,7,2);
bhh=substr(b,9,2);
bmm=substr(b,11,2);
cards;
201409041214 201409041512
201409041214 201409041512
;
run;
data kk;
set ss;
if amon="01" then amons="jan";
if amon="02" then amons="feb";
if amon="03" then amons="Mar";
if amon="04" then amons="Apr";
if amon="05" then amons="May";
if amon="06" then amons="Jul";
if amon="07" then amons="Jul";
if amon="08" then amons="Aug";
if amon="09" then amons="Sep";
if amon="10" then amons="Oct";
if amon="11" then amons="Nov";
if amon="12" then amons="Dec";
if bmon="01" then bmons="jan";
if bmon="02" then bmons="feb";
if bmon="03" then bmons="Mar";
if bmon="04" then bmons="Apr";
if bmon="05" then bmons="May";
if bmon="06" then bmons="Jul";
if bmon="07" then bmons="Jul";
if bmon="08" then bmons="Aug";
if bmon="09" then bmons="Sep";
if bmon="10" then bmons="Oct";
if bmon="11" then bmons="Nov";
if bmon="12" then bmons="Dec";
run;
data ks;
set kk;
aks=trim(aday)||trim(amons)||trim(ayear)||trim(ahh)||trim(amm);
bks=trim(bday)||trim(bmons)||trim(byear)||trim(bhh)||trim(bmm);
akss = substr(aks, 1, 9)||':'||substr(aks, 10, 2)||':'||substr(aks, 12, 2);
bkss = substr(bks, 1, 9)||':'||substr(bks, 10, 2)||':'||substr(bks, 12, 2);
aa=INPUT(akss,datetime.);/*字符型转化成日期时间型*/
bb=INPUT(bkss,datetime.);/*字符型转化成日期时间型*/
t=Intck('minite',akss,bkss);/*求两个时间点之间的分钟数*/
run;
这是我的程序 可是老师报错