Tag: mdyampm

How to convert the datetime character string to SAS datetime value? (ANYDTDTM and MDYAMPM formats)

When we have a string like this “9/01/2010 11:52:54 AM” and would like to translate the string to a numeric SAS date time variable, most of the times we use SCAN function to extract the information to get the DATETIME format. This is definitely a ted…