Hello,
I probably have a very simple query but I can't work out how to solve it
I have a variable entitled 'y_m_delivery' which is a numeric variable example 199906, I want to create a new variable taking out the month out so that I am only left with the year i.e remove the 06 so it leaves 1999. I have tried
gen year = year (y_m_delivery)
but this does not work
Any help gratefully received
thanks