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

st: insheet time


From   "Hans J. Baumgartner" <[email protected]>
To   [email protected]
Subject   st: insheet time
Date   Tue, 07 Dec 2004 15:54:13 +0100

Dear statalist,

I’ve got data that comes in ASCII format and I use the insheet command to read it.

One variable indicates calendar time. That is “21.01.2002” indicates the 21st January 2002.

Unfortunately -insheet- stores the variable as string.

How can I transform this information into %dD_m_Y, so that I can make easy calculations, like what happens in, say, five days? (gen newvar=timevar+5)

Thanks for helping me on this.
Hans

--
Hans J. Baumgartner DIW Berlin
German Institute for Economic Research
Dept. Public Economics
Königin-Luise-Str. 5; 14195 Berlin; Germany
Tel.: +49/30/89789-307
Fax.: +49/30/89789-114
http://www.diw.de
http://www.hansbaumgartner.de

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