How to calculate Age using SQL Query
DateDiff function can be used to get the Age from the birth date
Select BirthDate, DateDiff(year, BirthDate, getdate()) as Age from HumanResources.Employee
DateDiff function can be used to get the Age from the birth date
Select BirthDate, DateDiff(year, BirthDate, getdate()) as Age from HumanResources.Employee
0 comments:
Post a Comment