If your data is in column A and they are all dates, you could use something like this...
=IF(SUMPRODUCT(--(YEAR(A2:A10)=2006))=COUNT(A2:A10),"Yes","No")
Of course you would need to define the year (2006 in this example) and it assumes a range of only A2:A10.
Is the year defined here, or are you looking for any difference?