Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: AW: dates


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: dates
Date   Wed, 15 Sep 2010 09:17:46 +0200

<> 



*************
clear*

input str8 mydates
01051987 
09151973
12302005 
end

gen mycorrectdate=date(mydates, "MDY")
form mycorrectdate %td

li, noo
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Michael Eisenberg
Gesendet: Dienstag, 14. September 2010 22:10
An: statalist@hsphsun2.harvard.edu
Betreff: st: dates

Colleagues,

I have a filed with dates listed as such

01051987 which is Jan 5, 1987
09151973 which is Sept 15, 1973
12302005 which is Dec 30, 2005

How can I make stata automatically recognize that date format?

Thank you in advance.

Mike
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index