I have a timestamp in string; Any better way to create SAS datatime with keep millisecond? data x; timestamp="2013-07-01-01.06.15.918000"; sas_datetime=input(timestamp,anydtdtm.)+substr(timestamp,20); format sas_datetime datetime26.6; run; proc print; run;