Jump to content
Server Maintenance This Week. ×

An age calculation


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

Recommended Posts

I have a database of Driver Ed students. I need a formula for a calculation field that will calculate the student's age in years on the last day of class for their session. The database already has a field for "birthdate" (ex 11/06/1991.) It has a field for "session" (ex Session 1, Session 2, etc). It has a calculation field for "date of last class" (ex if the session = Session 1 then the last day of class is 9/30/2006. If the session = Session 2 then the last day of class is 11/28/2006, and so on)

For example, if the student with the 11/06/1991 birthdate takes the Session 1 class he will be 14 on the last day of class. If he takes the Session 2 class he will be 15 on the last day of class. Therefore, I'm looking for a calculation field formula that will give me age in years given a birthdate and Session #. Thanks in advance for any help you can give me

Link to comment
Share on other sites

Are you really using FileMaker v4?

If so, then you can not use a Custom Function. Although, in this case it isn't needed.

The question on how to figure ages, or the elapsed days between two dates, comes up from time to time. If you do a search for [color:blue]+Birthday +Calculation (using the [color:blue]pluses as shown), you should come up with lots of examples. If you are using version 4 as you stated, then you will need to replace the [color:red]Get (CurrentDate) or [color:red]Status (CurrentDate) with your [color:red]Session Date.

HTH

Lee

Link to comment
Share on other sites

Adapted from the FileMaker knowledge base ( www.filemaker.com/kb/ - search for "age"):P

Year (date of last class) - Year (birthdate) -

Case( date of last class < Date (Month (birthdate); Day (BirthDate); Year (date of last class)); 1; 0 )

Link to comment
Share on other sites

This topic is 6478 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.