--Calculate age from data of birth USE AdventureWorks2014 GO SELECT BirthDate, 2015-YEAR(BirthDate), FLOOR(DATEDIFF(DAY,BirthDate,GETDATE()) / 365) AS 'Employee''s Age', CASE WHEN DAY(BirthDate) > DAY(GETDATE()) AND MONTH(BirthDate) >= MONTH(GETDATE()) THEN DATEDIFF(YEAR,BirthDate,GETDATE()) - 1 ELSE DATEDIFF(YEAR,BirthDate,GETDATE()) END AS 'Employee''s Age' FROM HumanResources.Employee