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: Creating STATA Date variable


From   "Venkiteshwaran, Vinod" <Vinod.Venkiteshwaran@tamucc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Creating STATA Date variable
Date   Sun, 25 Sep 2011 22:09:28 +0000

Hello
I have a stata data set with two columns that correspond to the month (double, %12.0g) and year(float,%9.0g) of my observations. 
To be honest I do not know what the type and format of the variables imply. 
I want to create a new variable,date, that combines these two variables.
To complicate matters I also need to set the date itself to the 15th of the month for each observation.
That is in a mm/dd/yyyy format I want all the dates (dd) to be set to the 15th along with the corresponding month and year that are in my dataset. 
Any inputs /suggestions?

Thank you

Vinod


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