Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: From: Kim Price <kprice@hsph.harvard.edu>


From   owner-statalist@hsphsun2.harvard.edu
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: From: Kim Price <kprice@hsph.harvard.edu>
Date   Wed, 16 Jul 2003 13:21:20 -0400

Hi,

I have a string variable dob (date of birth) entered as (mdy) 1/1/49, 1/1/50... and currently stored as %9s. I need to convert these into dates. I used the following:

. gen dob1=date(dob, "md19y")
. format dob1 %dN/D/Y;

however, this appears to be changing the dates. Any advice?

Thanks,
Kim

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index