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 (March 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sas-l@uga.edu
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.


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