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

Re: st: convert "yyyymmdd" string date variable into numerical?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   Re: st: convert "yyyymmdd" string date variable into numerical?
Date   Wed, 1 Oct 2003 18:56:08 +0100

FF NN

> I should have elaborated my problem in more details. I
> know there's a date() function. But my variable is in
> the "yyyymmdd" string form, without any seperating
> simpols between year, month and date, so date() will
> produce all missing variables if ever convert.
> So should I try to convert this into a numerical
> variable and then manipulate in a complex way to
> extract the correct date information?

. search date

points you to

FAQ     .  Handling date information when numbers are in a continuous
sequence
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D.
Reichel
        2/03    How do I convert date variables into Stata elapsed
                dates when the numbers run together, like 4151999?
                http://www.stata.com/support/faqs/data/dateseq.html

which in turn points you to a program for this problem
-todate- on SSC.

Nick
[email protected]

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index