Statalist


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

st: RE: AW: Converting date strings into dates


From   DE SOUZA Eric <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: AW: Converting date strings into dates
Date   Mon, 15 Feb 2010 16:42:26 +0100

Thanks, Martin.
Instead of monthly, I had put date; and that gave me huge numbers

Eric 


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

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: 15 February 2010 16:17
To: [email protected]
Subject: st: AW: Converting date strings into dates


<> 



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

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