Data ageatreferral;
Set age_test;
BRTH_DT = datetime();
LST_UPDT_DT = intnx('dtyear',b,-20,'b');
interval = b - a;
format b a datetime19. interval time20.;
run; Hi Kurt, Can you please advise how to set this up. Essentially, I need age at referral, threfore Date of Birth minus Last Update Date: age at referral = BRTH_DT - LST_UPDT_DT - I tried a lot with intnx and YRDIF, but can't get it working. With your example I don't understand how to set it up and why you have datetime19 and time20. My original data is all in datetime 18 Help is greatly appreaciated. Thanks, Anna
... View more