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

Determin Age????

Featured Replies

Does anyone have a good calcualtion or solution for determining a persons age by comparing currentDate with a field containing the persons date of birth. Seems like a simple solution that I can't seem to make work.

How do you want the age displayed, Papabjoe?

Year number only, year number with "years old", Year and Days? How will it need to be formatted?

You could create a calculation field with a calculation like this:

Year(Get(CurrentDate)) - Year(dateofbirth) - (Get(CurrentDate) < Date(Month(dateofbirth); Day(dateofbirth); Year(Get(CurrentDate))))

I found the above calc a long time ago somewhere on this forum. Since then it has worked fine for me.

I think this one should work better:

Case(Day(Get(CurrentDate)) =Day(dateofbirth) and Month(Get(CurrentDate)) ≥ Month(dateofbirth);Year(Get(CurrentDate)) - Year(dateofbirth);Year(Get(CurrentDate)) - Year(dateofbirth) - (Get(CurrentDate) < Date(Month(dateofbirth); Day(dateofbirth); Year(Get(CurrentDate)))))

Both produce the same results. It just depends how convoluted of a calculation you want to use. :wink2: Note that the second half of your calculation is all that is necessary since (Get(CurrentDate) < Date( Month(dob); Day(dob); Year(Get(CurrentDate)) )) will return 0 when the current date is greater than or equal to the birthdate for the current year, so nothing will be subtracted.

  • Author

These are all great, I've already inserted one and it's working just great. I always seem to get stuck in one particular line of thought until I hit a brick wall. Usually these posts remind me of something I forgot and then suddenly it all becomes clear.

Thanks for your help.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.