I want to calculate age using the method suggested here,
format the date to yyyymmdd and subtract the date of birth (also yyyymmdd) from the current date then drop the last 4 digits you've got the age
I tried this.
((CAST(CONVERT(nvarchar(30),  GETDATE()  , 112)  AS INT))-CAST(CONVERT(nvarchar(30),  @date, 112)  AS INT)/100000)
But it returns me the same number 20210428
 
     
    