Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: generating age using dates


From   martine etienne <[email protected]>
To   [email protected]
Subject   st: generating age using dates
Date   Fri, 17 Dec 2010 07:26:46 -0800 (PST)

Hi Statlisters,
I am trying to generate age using the following variables:

"survey_date"=survey date

"q1_dob2"=date of birth

I started with the following command:
gen nage= survey_date- q1_dob2
gen age= nage/365.4
but I'm stuck at this point because it looks like the numbers are very similar 
to each other, ie..I have a sample of 287 and over 200 are 50 plus....

thanks for any help!
martine


      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index