data myfile; set file1; tdy=&pbd_date; ckdt=CK007_dt; age=tdy-ckdt; format age date9.; run; In our database &pbd_date is a numeric that can be converted to a date format. ckdt is also a numeric When I run the code, it initially produces numerics and a difference (ie 19663 - 19604 = 59) If I format the age variable to a date9 I get wierd dates in the past (ie 19663 - 19604 = 29FEB1960) If I format tdy ckdt age to date9 I get something like (01NOV2013-03SEP2013=29FEB1960) I want the difference between 11/1/13 and 9/1/13 to be expressed in the actual date that is between the tdy and ck_dt.
... View more