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

Re: st: dates

From   Gary Longton <>
Subject   Re: st: dates
Date   Wed, 20 Oct 2004 13:21:51 -0700

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:

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