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: Function MONTHS
From
carmen gamarra <[email protected]>
To
stata list <[email protected]>
Subject
RE: st: Function MONTHS
Date
Thu, 30 May 2013 16:08:55 +0000
thank you
it was just what I needed
----------------------------------------
> Date: Thu, 30 May 2013 10:00:45 -0400
> From: [email protected]
> To: [email protected]
> Subject: Re: st: Function MONTHS
>
> gen nummonths=mofd(date2)-mofd(date1)
>
>
>
> On 5/30/2013 9:09 AM, carmen gamarra wrote:
>> hi people help me
>>
>> I would like to generate a newvar in my
>> stata database to using two oldvar in format
>> date (DDMMYYYY), I
>> would like the newvar returns the number
>> of months (time) between
>> <date1> and <date2>.
>>
>> How can I achieve this function in stata? In epi-info I get that with
>> this function:
>>
>> DEFINE newvar
>> ASSIGN newvar =MONTHS(date1, date2)
>>
>> thank you
>> Carmen Gamarra
>> *
>> * 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/
>>
>>
> *
> * 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/
*
* 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/