Question: how to calculate age in sql with years months and days?
Answer: Declare@dateofbirthdatetime.
Declare@currentdatetimedatetime.
Declare@yearsvarchar(40)
Declare@monthsvarchar(30)
Declare@daysvarchar(30)
set@dateofbirth='1986-03-15'--birthdate.
set@currentdatetime =getdate()--current datetime.
select@years=datediff(year,@dateofbirth,@currentdatetime)-- To find Years.