How To Calculate Age In SQL Server T-SQL Using DATEDIFF()
Here is a script to calculate an age of a person using TSQL using Convert().
Source: TSQL Reference
SELECT FirstName, LastName ,CONVERT(Int, DATEDIFF(day, BirthDate, GETDATE())/365.25) As Age FROM EmployeesDTR
Comments
Post a Comment