Dear, I am quite new to STATA and I need t seprate the year from tthe months and days, i.e. right now I have
"Dec 2007" and "19 Oct 2011" and i only want "2007" and "2011".
Please let me know if there is anyway I can do this in STATA instead of excel as this data is very large.


Example generated by -dataex-. To install: ssc install dataex
clear
str11 year int directorid double linkeddirectorid
"1971" 14010 411635791
"Dec 2007" 14010 94080412469
"Mar 2013" 14010 452529652
"1973" 14010 1595108021
"Apr 1998" 14010 14466297812
"2010" 14010 14480197833
"1979" 14010 2290573059
"19 Oct 2011" 14010 11852194451
"Nov 2000" 14010 51980411846
"Feb 1986" 14010 3581626766
"08 Sep 2009" 14010 3558236484
"Jul 2000" 14010 4625210406
"Jul 1994" 14010 629144854
"May 2006" 14010 13645736920
"2008" 14010 94083412476
"1989" 14010 438448496
"Feb 1986" 14010 12603255609
"2011" 14010 11963444640
"1979" 14010 2250571912
"Mar 2014" 14010 14311977652
"18 Feb 2004" 14010 2257272132
"1979" 14010 4583910103
"1991" 14010 632365304

Kind Regards
Jas