I have a CSV file with a column with a date format of MM/DD/YYYY HH:MM that I would like to convert to MM/DD/YYYY. This is pretty painless in Python but haven't been able to figure it out in SAS. My data step looks something like this: data foo;
infile <path> delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2;
informat ID best32. ;
informat DATE anydtdtm40. ;
format ID best12. ;
format DATE datetime. ;
input
ID
DATE;
run; I figure I can do something like this: DATE = INPUT(PUT(DATE, 8.), MMDDYY10.); But the number are too big, ~1.8E9, for it to be a valid value for the input function. I'm thinking of using regular expressions to cut off the time part? That's all I can think of.
... View more