Viewing post 1 (of 1 total)
The third query, the way it is written returns an incorrect age.
This is the correct query:
SELECT DATEDIFF(yy, DateOfBirth, GETDATE()) -
CASE WHEN DATEPART(m, DateOfBirth) > DATEPART(m, GETDATE())
AND DATEPART(d, DateOfBirth)...
March 6, 2008 at 9:00 am
#786066