Donate

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().
  SELECT FirstName, LastName   
    ,CONVERT(Int, DATEDIFF(day, BirthDate,   
    GETDATE())/365.25) As Age   
  FROM EmployeesDTR  
Source: TSQL Reference

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Pass GUID As Parameter To Action Using ASP.NET MVC ContribGrid