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
Graph title in different colors to replace legendHi, I am trying to use the graph title to replace the legend. In this example, I would like the wor…
Data interpretationHelp please with interpretation. Code: xtpcse ta rank score b safety health human ict prioritizatio…
Plotting variable for 5th and 25th day each month for multi-month panel data Hello (new here so excuse if my jargon sounds odd) For my panel data (going from 1st Jan 2012 - 30 …
Pie graph with missing values in spmapHi all, I wonder if its possible get a graph pie in blank if exist missing value in the data, examp…
RESET testHi, How can I run the RESET test for a gravity model with pair-fixed effects?: ppmlhdfe TRADE RTA …
Subscribe to:
Post Comments (Atom)
0 Response to extracting data from numbers
Post a Comment