There was a pattern typo (twice) in my previous reply:
p(ddmmyyy) should have been p(ddmmyyyy)
- Gary
Gary Longton wrote:
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/