Good afternoon, I have data set, the date is Char, I need convert to Date. data Set: Test_date DOB DOB2 19380527 1938-05-27 19720416 1972-04-16 19400701 1940-07-01 19520821 1952-08-21 19451202 1945-12-02 19320128 1932-01-28 19410922 1941-09-22 19620520 1962-05-20 19310303 1931-03-03 19300816 1930-08-16 My SAS program, but do not know this is not working: data new ; set test_date; b = (SUBSTR(DOB,1,4)||'-'||SUBSTR(DOB,5,2)||'-'||SUBSTR(DOB,7,2)); c=input(dob2,mmddyy10.); format c mmddyy10.; d=datepart(c); run; Please help/ I need convert DOB2 from Char to Date format.
... View more