Bookmark and Share

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]

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


From   Muhammad Anees <[email protected]>
To   [email protected]
Subject   Re: st: how to get age in number of years, months and days
Date   Fri, 19 Oct 2012 08:29:53 +0500

Yes,

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

http://www.stata.com/statalist/archive/2011-01/msg00888.html


HTH
Anees

On Fri, Oct 19, 2012 at 3:10 AM, jose maria pacheco de souza
<[email protected]> wrote:
> Dear Statalisters:
> is there any user writen program that presents the differences between two
> dates DMY (today date and birthday date, say) as number of years, months and
> days?
> I tried the help (all three searchs), the dates and times help  and the pdf
> manual. Maybe I am missing something.
> Thank you for the help.
> jose 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
> www.fsp.usp.br/~jmpsouza
>
> *
> *   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/



-- 

Best
---------------------------
Muhammad Anees
Assistant Professor/Programme Coordinator
COMSATS Institute of Information Technology
Attock 43600, Pakistan
http://www.aneconomist.com
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index