There might be many script used for finding the age, but this one I wrote as it is very to understand and simple to use. Here if anyone wants that the difference between two dates be calculated on basis on years, month and days passe between those two dates especially for dinding the age then this script is very handy.
Currently this script returns the difference text in format xx year(s), xx month(s), xx day(s)
So if anyone want to use this, it is very simple, Pass the From Date as first argument and To date as second argument it will return you the difference text
eg.
Select DBO.FN_GETDATEDIFFTEXT('30-Dec-2010', '31-Jan-2011') will give you result 0 year(s), 1 month(s), 1 day(s)
For finding Age of any person just pass the date of birth as first argument and GetDate() as second argument it will return you the age.
Select DBO.FN_GETDATEDIFFTEXT('01-Jan-1990', Getdate()) will give 21 year(s), 7 month(s), 29 day(s)