Try this:
data test;
do txt =
"Wednesday, September 06, 2017 10:14 PM",
"2017-07-14 13:01:00.0";
if anydigit(first(txt)) then
date = input(txt, e8601dt19.);
else date = input(prxchange("s/\s*\w+,\s*//o",1,txt), anydtdtm40.);
output;
end;
format date datetime19.;
run;
proc print; run;
... View more