select 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

DECLARE @d datetime = '1932-12-29 00:00:00.000'

SELECT datediff(year, @d, getdate()) - 
CASE WHEN dateadd(year,1900-year(@d) ,@d) > 
dateadd(year,1900-year(getdate()) ,getdate()) 
THEN 1 else 0 END AGE

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results