Pages

Social Icons

Thursday 27 October 2011

Age Calculation


Hi,
In most of the project we need to calculate the age. Consider below TSQL to calculate age, it should be used where age needs to be displayed.

SELECT CAST((DATEDIFF(dd, <date_of_birth>, GETDATE())/365.25) AS INT)

No comments:

Post a Comment