An often needed--yet difficult to create--variable is a "duration" variable that seeks to capture time (or number of days) and is derived by "subtracting," e.g., a start-date from an end-date. This computation's degree of difficulty is enhanced by complexities incident to how dates (and time) are formatted in Stata. Those interested can find a recent step-by-step explanation (and illustration) here.
Comments