hi all....

i want to extract the number became year:

1995-7-xxxxxx ======= 1995
2015-12-xxx========= 2015
2010-07-xxxx======== 2011
2010-06-xxxx======== 2010

criteria:
- if data ">=July 2010" ----show 2011
- if data between 2010-01-xxx to 2010-06-xxxxx -----show 2010
any assistance, much appreciated..

john m