There could be multiple ways to do it.
Considering the input variable is in character format then you can use following expressions
tm = timepart(dhms(00,substr(time,1,2),substr(time,3,2),00));
put tm =time8.;
sasbuddy
http://sites.google.com/site/sasbuddy/