Dear Statalists,
I have an excel file with dates like 29.02.1980, 30.03.1980 and etc... I have appended Y in front of every date in the excel file and then imported it to the STATA. I had to appended Y in front of dates since i have to reshape the data (from wide to long) in the STATA.
I have used codes like: gen year = year(date) - 60 // Getting YEAR from the date
gen month = month(date) // Getting MONTH from the date
With year everything worked fine but with month i am getting wrong values, what can be possible reason for that and how can i fix it?
Related Posts with extracting data from numbers
Gmm arellano estimation .Hello everyone , I am writing my master thesis about determinants of international migration from d…
Failure to define a new scalar in a if clauseDear Statalist community I´ve encountered a wierd situation today: failing to define a new scalar. …
How to estimate elasticity in both sides Box-Cox transformed modelDear STATA users, I have a model that both dependent and independent variables are box-cox transfor…
Cox Hazard different starting points and year dummiesHey I am investigating the effects of different investor types (A, B and C) on the failure rate of…
Principal Component Analysis selecting country and questions under conditionsHello dear statalisters, I am working with the World Value Survey that have several questions for d…
Subscribe to:
Post Comments (Atom)
0 Response to extracting data from numbers
Post a Comment