Hello,
I need to find the "year" in which the head office of companies in my data set has changed. For example in company 001001, the city has changed in 1982.
input str6 CompanyID double Year str100 HeadquarterCity
CompanyID Year HeadquarterCity
"001001" 1978 "Tulsa"
"001001" 1979 "Tulsa"
"001001" 1980 "Tulsa"
"001001" 1981 "Tulsa"
"001001" 1982 "Dallas"
"001001" 1983 "Dallas"
"001001" 1984 "Dallas"
"001001" 1985 "Dallas"
"001002" 1960 "Hunt Valley"
"001002" 1961 "Hunt Valley"
"001002" 1962 "Hunt Valley"
"001002" 1963 "Hunt Valley"
"001002" 1964 "Hunt Valley"
Could I ask you to help me with command which can extract the year for each company?
Thanks
I need to find the "year" in which the head office of companies in my data set has changed. For example in company 001001, the city has changed in 1982.
input str6 CompanyID double Year str100 HeadquarterCity
CompanyID Year HeadquarterCity
"001001" 1978 "Tulsa"
"001001" 1979 "Tulsa"
"001001" 1980 "Tulsa"
"001001" 1981 "Tulsa"
"001001" 1982 "Dallas"
"001001" 1983 "Dallas"
"001001" 1984 "Dallas"
"001001" 1985 "Dallas"
"001002" 1960 "Hunt Valley"
"001002" 1961 "Hunt Valley"
"001002" 1962 "Hunt Valley"
"001002" 1963 "Hunt Valley"
"001002" 1964 "Hunt Valley"
Could I ask you to help me with command which can extract the year for each company?
Thanks
Comment