Results 1 to 2 of 2

Thread: Need SQL to calculate the age of a member based on DOB and current date

  1. #1
    Join Date
    Sep 2015
    Posts
    2

    Need SQL to calculate the age of a member based on DOB and current date

    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?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •