My first tip is that you show us your code. We can't comment on
"problems" that aren't explained.
My second tip is to look at the help, in this case for date functions.
gen start = mdy(startm, startd, starty) may be a good start.
Nick
[email protected]
Ziad El-Khatib
I entered dates of patients starting on treatment and date of their
interview under different variables:
startd (for day)
startm (for month)
starty (for year)
surveyd (for day)
surveym (month)
surveyy (year)
Now i want to calculate number of months patients have been on
treatment.
I am finding problems in creating
start=startd+startm+starty
survey=surveyd+surveym+surveyy
period=survey-start
Any tips?
*
* 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/