Viewing post 1 (of 1 total)
The Third answer should be correct only the CASE condition values are reversed.
Like this
"SELECT DATEDIFF(yy, @DateOfBirth, GETDATE()) - CASE WHEN DATEPART(m, @DateOfBirth) >= DATEPART(m, GETDATE()) AND DATEPART(d, @DateOfBirth) >= DATEPART(d,...
March 6, 2008 at 4:48 pm
#786413