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 of individual

Featured Replies

Hope someone can help me here!!

We have a field with the birthday of a person. We need to determine his age today! I am not sure of the calculation to use because of leap years and such.. any help would be greatly appreciated..

Thanks

Stu

  • Newbies

Stuj,

There may be an easier solutions, but I quickly tested this and it worked.

1. Create a calculation field c_bday.

code:


Year(birthday_field)

2. Create a calculation field c_today. Use the 'Today' from the Date Functions menu and make sure the output of this field is TEXT.

3. Create a calculation field c_age. Use

code:


If(Left(bday_text, 5) <= Left(c_today, 5), Right(c_today,4) - Right(bday_text,4),Right(c_today,4) - Right(bday_text,4) - 1)

Hope this helps,

Tim

[ February 22, 2002, 09:46 AM: Message edited by: autdesign ]

FileMaker.com has an article about this.

Click here.

Note: the article does caution the use of the Today function, but for some reason, doesn't mention Status(CurrentDate) as an alternative -- it's generally a much better way to go.

It may have been written before a version of FileMaker came out with Status functions.

The only real problem with the Today function is that is only evaluates when FileMaker opens the file, so if the file is left open overnight, Today won't return the correct date. Status( CurrentDate ) doesn't have this limitation. FileMaker has kept the Today function around for backwards compatibility.

Chuck

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.