select 1


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-04-29 00:00:00.000'

SELECT datediff(year, @d, getdate()) - 
CASE WHEN dateadd(year,1896-year(@d) ,@d) > 
dateadd(year,1896-year(getdate()) ,getdate()) 
THEN 1 else 0 END AGe, cast('1896-02-29' as datetime)

Enter Parameters

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