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: date calculation
From
Daniel Marcelino <[email protected]>
To
[email protected]
Subject
st: date calculation
Date
Thu, 29 Sep 2011 17:21:22 -0400
Hello all,
I'm fuzzing my mind to get into calculation of date vars. I've a data
set with historic of events that I want to calculate number of days.
However, I need to account for those occurrences in par of them, the
first date is the enter and the subsequent date is the out. If the
same id enter again it will receive new enter e new out date. My point
is, how can I calculate the overall period regarding this intermediary
calculation? Any thoughts is welcome.
day flag_n flag_N id
07may2003 1 4 1
23feb2005 2 4 1
31mar2005 3 4 1
31jan2007 4 4 1
01feb2003 1 2 5
21dec2005 2 2 5
Daniel
*
* 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/