Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Importing date data


From   "Nuno Soares" <[email protected]>
To   <[email protected]>
Subject   RE: st: Importing date data
Date   Sun, 25 Jun 2006 13:38:55 +0100

Thanks Robert !

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Robert A Yaffee
Sent: 25 June 2006 13:15
To: [email protected]
Subject: Re: st: Importing date data

Nuno,

PS: You might have to add 2000 or 1900 to the variable to get it in the form
to convert it to a string.  Then use the string function for the conversion.
Then use the commands I just suggested.

Robert

Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University

home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
[email protected]

----- Original Message -----
From: Nuno Soares <[email protected]>
Date: Sunday, June 25, 2006 6:03 am
Subject: st: Importing date data

> Hi everyone,
> 
> I have a file that has a variable date using the format YYMMDD, and I 
> haven't been able to import it as a date format to Stata. I've been 
> usingthe -infix- command. I don't have any problem to import it as 
> number but then I would loose the date information. For instance, I 
> have one observation that has 000112, i.e., 2000/01/12 and Stata reads 
> it as 112...If anyone could give a idea of how to solve this issue, I 
> would be greatly appreciated.
> 
> Best,
> 
> 
> *
> *   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/
> 
*
*   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/

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