I am not sure why people didn't like the function because It works for me. I created yet another sample table as shown below and the result using this query was fantastic:
USE testDB
GO
SELECT [ID]
,[FirstName]
,[LastName]
,[BirthDate]
,FORMAT (getdate(), 'yyyy-MM-dd') as Today
,dbo.fn_DateDiffParts([BirthDate]) AS [CurrentAge]
,[Hiredate]
,dbo.fn_DateDiffParts([HireDate]) AS [Experience]
,[Department]
,[Salary]
FROM [testDB].[dbo].[Employees]
Output: