Reputation: 1124
If I have an input char like:
JULY 3, 2013
how can I turn this into a date type
data in SAS? This is what I've tried so far:
input(trim(t1.date), MMDDYY10.)
However, this just gives me .
in all entries.
Upvotes: 0
Views: 13448
Reputation: 28391
This seems to work
data have;
dt="July 3, 2013";
run;
PROC SQL noprint;
CREATE TABLE want AS
SELECT input(dt,ANYDTDTE20.) as new_date format=mmddyy10.
FROM have;
QUIT;
Upvotes: 4