Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Function MONTHS


From   carmen gamarra <carmengamarra@hotmail.com>
To   stata list <statalist@hsphsun2.harvard.edu>
Subject   st: Function MONTHS
Date   Thu, 30 May 2013 13:09:35 +0000

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index