data have;
input datetime $50.;
datalines;
2008-01-03-09.58.19.207772
;
run;
data want (Drop=datetime_) ;
format datetime datetime24.3;
set have(rename=(datetime=datetime_));
datetime=dhms(input(substr(datetime_,1,10),yymmdd10.),0,0,input(substr(datetime_,12),time32.));
run;
You need to rename the variable, if you wish to change the type of a variable as you desired. Rename and use @Tom suggestion to convert to DATETIME format
... View more