Calculating Age
To display the correct age of a person:declare
@date as DATETIME
SET @date = '09/17/1976'
SELECT CAST( datediff(d, @date, getdate()) / 364 as VARCHAR) + ' Years ' +
CAST( datediff(m, dateadd(year, datediff(d, @date, getdate()) / 364, getdate()), getdate()) as VARCHAR) + ' Months ' +
CAST( datepart(d, getdate()) as VARCHAR) + ' Days' AS Age