In the mean time, I found what happend to my dataset. There were few observations in the form of ddmmyy10. istead of mmddyy10. I changed my code into like this data man. manager_info_full_match_date_rv; set man. manager_info_full_match; if length(birthdate)=4 then n_birthdate=mdy(6,30,input(birthdate,4.)); else if length(birthdate)=9 and input(scan(birthdate,1,"/"),best2.)>12 then n_birthdate=input("0"||birthdate,ddmmyy10.); else if length(birthdate)=9 and input(scan(birthdate,1,"/"),best2.)<=12 then n_birthdate=input("0"||birthdate,mmddyy10.); else if length(birthdate)=10 and input(scan(birthdate,1,"/"),best2.)>12 then n_birthdate=input(birthdate,ddmmyy10.); else if length(birthdate)=10 and input(scan(birthdate,1,"/"),best2.)<=12 then n_birthdate=input(birthdate,mmddyy10.); else n_birthdate=.; run; Now, I got the result that I sought for. Again, thanks for the reply.
... View more