data test;
borrower_dob = 25AUG1947:00:00:00.000000;
BORROWER_DOB1 = BORROWER_DOB;format BORROWER_DOB1 yyyymmdd10.;
run;
I get the results truncated with a bunch of ........... in the field
Desired result is 19470825
View solution in original post
borrower_dob = '25AUG1947:00:00:00.000000'dt;
BORROWER_DOB1 = datepart(BORROWER_DOB);format BORROWER_DOB1 yymmdd10.;
You have to tell SAS it is a datetime value (in-close in quotes & add dt) then use datepart function to pull out the date. The correct format is yymmdd10.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Submit your idea!
Select SAS Training centers are offering in-person courses. View upcoming courses for:
View all other training opportunities.