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]

Re: st: RE: date calculation


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: date calculation
Date   Mon, 10 Mar 2014 20:00:54 +0000

I see the similarity now!

If one date is monthly and the other daily, convert the daily to
monthly and calculate the difference in months. Completed years are
then floor(months/12).  More precision is likely to be spurious.
Nick
[email protected]


On 10 March 2014 19:58, Nick Cox <[email protected]> wrote:
> That question looks different to me.
>
> Nick
> [email protected]
>
>
> On 10 March 2014 19:52, Joe Canner <[email protected]> wrote:
>> Matthew,
>>
>> I think you asked more or less the same question a few months ago: http://www.stata.com/statalist/archive/2013-10/msg00662.html
>>
>> At any rate, the answers given at that time should help answer this question.
>>
>> Regards,
>> Joe Canner
>> Johns Hopkins University School of Medicine
>>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf Of DeMichele, Matthew
>> Sent: Monday, March 10, 2014 3:39 PM
>> To: [email protected]
>> Subject: st: date calculation
>>
>> I have two date variables arranged as YYYYMM and YYYYYMMDD. The first
>> variable is date of birth and the second is date of admission to
>> treatment. I am trying to calculate age_at_admission, but am running
>> into trouble. Is this a possible calculation since Stata calculates
>> dates as days since 1,1,1960?
>>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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