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

Re: st: dates


From   Gary Longton <glongton@fhcrc.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: dates
Date   Wed, 20 Oct 2004 13:16:57 -0700

Rodrigo Briceno wrote:
Dear statalisters. I reviewed the FAQ about how to handle dates and I
discovered some interesting functions to deal with dates. I have a little
problem with the dates I have, because the order of mm-dd-yy is not present.
My dates are dd-mm-yy. I downloaded the "todate" program, and I was capable
to convert the dates in several files that I have, but other files has this
different structure. Does anyone knows how to handle with this feature?

-todate- should do it. Look at the help file a little more carefully.

-todate- doesn't require mm-dd-yy order. In fact, it requires that you specify the order with the pattern option. in your case, ddmmyyy, i.e.

todate adm_date dis_date, p(ddmmyyy) gen(adm_date2 dis_date2)

- Gary

*
* 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