Usually there's an informat for the date, but this doesn't have an informat that I could find.
You can create it into a date format that SAS will recognize, I used Date9. format, since it's the most common in SAS.
I use the SUBSTR, SCANx2 function to extract the month, day and year, respectively, and the CATT to concatenate them together.
data have; informat date_char $20.; input date_char $20.; cards; April 1, 2016 December 24, 2016 April 30, 2015 May 18, 2014 November 1, 2012 February 28, 2016 ; run; data want; set have; date_format9 = catt(put(input(scan(date_char, 2), 2.), z2.), substr(date_char, 1, 3), scan(date_char, 3) ); date_num = input(date_format9, date9.); format date_num date9.; run;
You guys are right! There's a WORDDATE18 format, but not a WORDDATE18 informat.
Reeza's idea looks good. I might simplify one part:
date_format9 = cats( scan(date_char, 2, ' ,'), substr(date_char, 1, 3), scan(date_char, 3) );
Note that both blanks and commas are being used as delimiters in the first SCAN function.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.