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.

Featured Replies

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

Here is a custom function I wrote.

//form: years ( date1 ; date2 )

If(not IsEmpty(date1) and not IsEmpty(date2);

Abs ((GetAsDate(date2) - GetAsDate ( date1)))/365.25;"")

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

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 )

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.