Date: Wed, 20 Jul 2011 11:30:11 -1000
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: John Parker <John.V.Parker@KP.ORG>
Subject: Figuring out Age in Years, Months and Days
Content-Type: text/plain; charset="US-ASCII"
I have a requirement to figure out Age at Death and it has to be expressed
in Years, Months, Weeks and Days.
This is to accommodate individuals who may have died a short period after
In the past I have used code like this:
%macro CalcAge(BDtVar, RefDate) ;
floor ((intck('month',&BDTVar,&RefDate) - (day(&RefDate) < day(&BDTVar)))
%mend CalcAge ;
The DOB and DOD variables are formatted as MMDDYY10.
Has anyone done this type of calculation to this degree?