Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Combining two data variables (month and year)


From   Najib Mozahem <[email protected]>
To   [email protected]
Subject   Re: st: Combining two data variables (month and year)
Date   Tue, 6 Aug 2013 19:31:23 +0300

if I understand correctly, you have a month_variable and a year_variable and want one date variable to contain both. I used the gen myvar = mdy(month_var, day_var, year_var) command for that.

Najib

On Aug 6, 2013, at 7:01 PM, MCar wrote:

> Dear Statalist users:
> 
> I need to combine two numeric variables into one variable.  The first
> variable is the month and the second variable is the year.  
> 
> Does anybody know how to do this?
> 
> Thank you.
> 
> 
> 
> --
> View this message in context: http://statalist.1588530.n2.nabble.com/Combining-two-data-variables-month-and-year-tp7580405.html
> Sent from the Statalist mailing list archive at Nabble.com.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index