Date: Wed, 31 Mar 2010 10:11:59 -0700
Reply-To: Tan <tan.p.pham@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tan <tan.p.pham@GMAIL.COM>
Organization: http://groups.google.com
Subject: SAS and dates
Content-Type: text/plain; charset=ISO-8859-1
I'm an Masters level student working on my thesis. I am trying to
figure out how to do this.
So basically I want to know how long has a person been living with a
disease on the day he/she took the survey. So I have the date that the
person has been diagnosed with a disease and the date the person took
the survey.
both dates are in datetime22.3 format and informat.
I know SAS keeps dates by the number of days since (or before) a
certain date.
So I figure to find out my question I would do:
LengthDisease=datesurveytaken-datediseasedx;
I figure that would give me days and i want this in years, so I would
do:
LengthDisease1=LengthDisease/365;
I get really odd results.
For my first case i get LengthDisease=34883200 and
LengthDisease1=68173.
I think my logic on getting this data makes sense. But clearly a 31
year old person would not have the disease for 68173 years. So I am
unsure what i am doing wrong to get this data... I am hoping someone
on this message board can help.