09-16-2014 08:50 AM
I have a variable that's CHAR with length16 (2014-07-01 00:15). I want to convert this to a DATETIME, so I tried the INPUT statement.
date = input(date1,datetime.);
Any help would be appreciated, thanks!
09-16-2014 09:10 AM
There are various ways of doing it, mdy function etc. Its more about selecting the appropriate formats for the data. Below I show some which will get you the result (note you can combine the steps, have them here just as a descriptive). Anyways, probably easiest is the anydtdtm informat.
attrib a format=$16. b format=date9. c format=tod5. d format=datetime. e format=datetime.;
Need further help from the community? Please ask a new question.