Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Age group calculation for athletes database


This topic is 8696 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Dear All

I developed a database for a school athletics team about 6 months ago which they have put to great use and got a lot out of it. It is a relational database, with seperate files for Athlete Information, results, etc.

The date of birth (DOB) of all 170 odd athletes is entered in the database in an appropriate field.

What I need to be able to do, is make a script to take this DOB information and classify athletes into age groups as follows:

Under 13, Under 14, U15, U16, U17 and Opens.

Basically, I want to be able to specify a particular cut-off date (for exampe, 30th May) and have the script work out which age bracket each athlete fits into.

I probably havn't explained this exceptionally well but with any luck someone will know what I'm looking for. If anyone needs more information I'd be more than happy.

I hope someone can help with this issue!

Regards

Ben.

  • 2 weeks later...
Posted

There are lots of ways to do this. Here's what I did:

Define three fields:

dob (date)

cutoff (global date field)

age (calculation)

The dob field is their date of birth (mm/dd/yyyy).

The cutoff is what you are defining as the cutoff age. To define it, choose global when creating the field then choose date from the dialogue that follows. You'll only need to type this in once, it will appear in every record.

You should enter your cutoff in the form mm/dd/yyyy, eg. 05/30/2001. You'll have to change it manually to 2002 next year (you could automate this bit - but I leave this as an exercise for you).

The calculation you'll need for age is the following:

Year(cutoff - dob)

and define the result as a number in the popup at the bottom left of the calculation dialogue.

This will give you the age of all the athletes in years relative to the cutoff date you enter. I tried it and it worked for me. Let me know if you have problems, can't understand my explanation, or need to do more with it.

This topic is 8696 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.