I need to calculate the year diferences between two dates.
Tried using DATEDIFF but that only do the less of the dates, for example:
Date 1: 07/03/2011
Date 2: 07/02/2012
(Date format MM/DD/YYYY)
Then: DATEDIFF([yyyy], ’07/03/2011′, ’07/02/2012′) = 1
But the real diferences are 0 year.
Since noone had a correct solution i post mine even though noone will ever notice.
This method is basically the same as the next method, difference is that it is done with numbers to avoid the casting, which i was told was slower.