DECLARE @d DATETIME
SET @d = '23.07.1968'
SELECT
DATEDIFF(yyyy,CAST(@d AS DATETIME),GETDATE())
-
(CASE WHEN DATEADD(yyyy,DATEDIFF(yyyy,CAST(@d AS DATETIME),GETDATE()),CAST(@d AS DATETIME)) >
GETDATE() THEN 1 ELSE 0 END)
-----------
35
(1 row(s) affected)