Home Forums SQL Server 2008 T-SQL (SS2K8) Age RE: Age
ColdCoffee
SSC-Dedicated
Points: 39971
More actions
May 26, 2010 at 8:53 pm
#1173093
You can use DATEDIFF function:
LIke:
SET DATEFORMAT DMY
SELECT DATEDIFF(yy,'21-03-1985',GETDATE()) AGE