Statalist


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

st: AW: Converting date strings into dates


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Converting date strings into dates
Date   Mon, 15 Feb 2010 16:17:12 +0100

<> 



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

input  str10 stringdate
1999Jan 
1999Feb 
end

gen double date=monthly(stringdate , "YM")
format date %tmMonth_CCYY
l
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von DE SOUZA Eric
Gesendet: Montag, 15. Februar 2010 15:47
An: Statalist
Betreff: st: Converting date strings into dates

I have never quite mastered the technique of converting date strings into
dates.
In this case, I have a string variable of the form: 1999Jan 1999Feb and so
on, and wish to convert it into a date
Thanks for any help.

Eric

Eric de Souza
College of Europe
Dyver 11
BE-8000 Brugge (Bruges)
Belgium



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