LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 19 Sep 2007 15:40:56 -0400
Reply-To:   Kevin Roland Viel <kviel@EMORY.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Kevin Roland Viel <kviel@EMORY.EDU>
Subject:   Re: RES: Finding actual age
In-Reply-To:   <001001c7fb13$58eb6240$0ac226c0$@com.br>
Content-Type:   TEXT/PLAIN; charset=US-ASCII

On Wed, 19 Sep 2007, Adriano Rodrigues - Instituto GPP wrote:

> Thanks, i am getting almost what I want, but never work with this functions, > see what happened (wrong ages). > I fell must change something...looks like SAS think I am in 1992... > > > data tt; > set xx; > age = floor((intck('month',born,today()) > - (day(today()) < day(born))) / 12); > proc print; > var id born age; > run; > > Obs id born age > > 1 26 03/11/78 15 > 2 16 05/20/80 13 > 3 18 07/03/81 12 > 4 11 09/02/87 6 > 5 12 12/01/78 14 > 6 14 04/19/84 9 > 7 19 09/14/82 11 > 8 21 09/30/83 9 > 9 20 06/16/89 4 > 10 28 11/11/72 20 > 11 27 04/16/82 11 > 12 17 11/28/79 13 > 13 15 04/27/81 12 > 14 13 08/08/79 14 > 15 22 02/10/88 5 > 16 23 12/22/78 14 > 17 24 02/20/84 9 > 18 25 01/21/77 16

On what OS are you using SAS?

%put %sysfunc( today(), mmddyy10. )) ;

It could be that your system date is wrong. Ahem! If so, reset it or you will have to manually assign today's date.

HTH,

Kevin

Kevin Viel, PhD Post-doctoral fellow Department of Genetics Southwest Foundation for Biomedical Research San Antonio, TX 78227


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