Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Age group calculation for athletes database

Featured Replies

  • Newbies

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...

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.