I have tried many times to convert date into sas time value but do not get the result. I am sharing my syntax please correct me where I am wrong. All the syntax executed perfectly except last one i.e final although it has converted from character to numeric type but its showing blank row. data test; infile datalines; input id$ date; datalines; 1001 505 1002 1023 ; run; here dates are given into numeric type I want to convert into 05:05 and 10:23 hour and minute format. data test1; set test; char = put(date, z4.); hour = substr(char,1,2); min = substr(char,3,2); con = trim(hour)||':'||trim(min); final = input(con,best12.); run;
... View more