```Date: Wed, 19 Sep 2007 21:05:00 +0000 Reply-To: toby dunn Sender: "SAS(r) Discussion" From: toby dunn Subject: Re: RES: Finding actual age Comments: To: tj_noreply@YAHOO.COM In-Reply-To: <200709192018.l8JIASA9031634@mailgw.cc.uga.edu> Content-Type: text/plain; format=flowed I dont have time to go into very deep but you can study this problem when a leap year is involved: data _null_; IntAge = floor((intck('month',"03MAR2000"d,"03MAR2002"d) - (day("03MAR2002"d) < day("03MAR2000"d))) / 12); YrdifAge = floor(yrdif("03MAR2000"d,"03MAR2002"d,"ACT/ACT")); put IntAge = YrdifAge = ; run; Toby Dunn Compromise is like telling a lie, it gets easier and easier. Each comprimise you make, that becomes your standard. Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else. From: T J Reply-To: T J To: SAS-L@LISTSERV.UGA.EDU Subject: Re: RES: Finding actual age Date: Wed, 19 Sep 2007 16:18:34 -0400 On Wed, 19 Sep 2007 20:07:53 +0000, toby dunn wrote: ====IN PART ============ >T J , > >YrDif Function does have some pitfalls and it will only check the number of >years between the birth year and the ending year. In other words you could >be adding an extra year to someone because the ending year is before their >actialy birthdate. Under optimal conditions calculating age this was is a >rough approximation at best. > > Can you show me an example for the situation you mentioned above? I would be interested to know the other pitfalls of this function as well. -TJ _________________________________________________________________ Share your special parenting moments! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us ```

Back to: Top of message | Previous page | Main SAS-L page