Hi.. Happy New year to all SAS People.. I had a question about variable conversion from char to date.. I am having a dataset and DOB is the one of the variable in that dataset. the value in that variable is like 20120131,20120215(YYYYMMDD). Now i want to convert this variable into date format.. i am using bellow logic and it working perfectly.. Data test; input date $20. ; cards; 20120102 20120108 20120110 20120131 ; run; data y; set test; Format date1 date9.; date=strip(substr(date,5,2)||'/'||substr(date,7,2)||'/'||substr(date,1,4)); date1 =input(substr(strip(date),1,10),MMDDYY10.); run; PRoc print; run; .but my strong believe is i am doing bit tricky ,we do this in more simple way by using formats and informats.. Could any body suggest me how to accomplish this task in a simple way??? Thanks in Advance.. Regards.. Sanjeev.K
... View more