|I am very surprised that you get an answer of 2012 for '=year(O7) '.|
25.3.2012 is not considered a Date.
Dates can use "/" or "-" as separators, but not "."
Excel treats any Date with "." as text.
The only way Excel sees it as a Date, is because it is a Date, but your Cell Format make it look like 25.3.2012
(Custom Format: "dd.m.yyyy")
Now, for "29.2.2010"...
You will get an error there.
There is no 29th of February in 2010.
The only way that will give you a Year is if the year is 2012.
The previous year that worked, was 2008.