# Database Discussions > Microsoft SQL Server 2008 >  Need SQL to calculate the age of a member based on DOB and current date

## Testtest123

I have a requirement to calculate the age of a member based on the Date of birth and Current date, and then classify that age into categories like Under 30, 31-40,41-50,51-60 and Above 60.
Can some one help me with this query?

----------


## skhanal

You can use datediff function get different in years between two dates, then you will have to use case statement to put then in different bands

----------

