Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: reading dates stored as string variable in .csv file


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: reading dates stored as string variable in .csv file
Date   Tue, 25 Aug 2009 22:30:57 +0200

<>


Well, it is generating missings equal to the number of observations, because you are asking Stata to interpret "31" as a month, and it rightly refuses to do so...


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Joshua A Shindell
Gesendet: Dienstag, 25. August 2009 22:22
An: [email protected]
Betreff: st: reading dates stored as string variable in .csv file

Hello all,

I am having trouble reformatting date values of the form 12/31/08.  The variables are stored as a sting variable and the code  gen newdate= date(date, "DMY", 2010) is generating a large number of missing values.  I am using Stata 11.

Thank you,

Joshua A. Shindell


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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