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: Formatting Dates


From   Amp <[email protected]>
To   [email protected]
Subject   st: Formatting Dates
Date   Fri, 10 Jun 2011 05:56:32 -0700 (PDT)

Hello,

I am trying to do the following:

I have generated a new variable to estimate the age of a patient beginning
with their date of birth to the time they took a blood sample.  Example:
Generate newage = Drawdate- birthdate             (this gives me the actual
number of days)

I made a new variable to get the actual days into years. Example:
                Generate currentage =newage/365.4     (this gives me years)

However, some patients are less than 1 year of age, so I need the age in
years and months.  How do I do this.

I am a novice user, any help would be great.  Thank you

~AMP


--
View this message in context: http://statalist.1588530.n2.nabble.com/Formatting-Dates-tp6462092p6462092.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   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