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, is already up and running.

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

Re: st: how to get age in number of years, months and days

From   jose maria pacheco de souza <>
Subject   Re: st: how to get age in number of years, months and days
Date   Fri, 19 Oct 2012 00:38:04 -0300

Em 19/10/2012 00:29, Muhammad Anees escreveu:

You can search for terms like difference between to times or dates and
could have found the following example from Nick Cox discussion on a
similar topic in 2011. You should be careful as the following might
work in its original where DMY is YMD also and Stata help on -help
datetime translation-

gen long daysbetween = date(enddate, "DMY") - date(startdate, "DMY")

The above example is taken from


Thank you, Anees.
josé maria

Jose Maria Pacheco de Souza
Professor Titular (aposentado), Professor Senior
Departamento de Epidemiologia/Faculdade de Saude Publica, USP
Av. Dr. Arnaldo, 715
01246-904  -  S. Paulo/SP - Brasil
fones (11)3061-7747; (11)3768-8612

*   For searches and help try:

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