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.

Date Calculation

Featured Replies

I am using this calculation to determine the age of an individual, but what I need to do is to compute the age using the Date of Birth from the Date of Death..

I replaced the [color:blue]now = Get ( CurrentDate ) ; with the DATEOFDEATH field, but an erronous answer.

Just can't seem to put my finger on what I am doing wrong.

Let ( [

now = Get ( CurrentDate ) ;

b = DOBdateField

] ;

Year ( now ) - Year( b ) - (( Month ( now ) + Day ( now ) / 100 ) < ( Month ( b ) + Day ( b ) / 100))

)

What do you want the results to look like.

50

49 years, 11 months, 17 days,

49 years

Or something else.

Lee

  • Author

Years, Months and Days would be great....

Thanks Lee

Here is a Custom Function that will do that:

Click Here

There are also a ton of example of age calculations around this Forum also that are not Custom Functions.

HTH

Lee

Edited by Guest
test

  • Author

Having problems with this calc...

Let ( leapFactor = If ( Mod ( Year ( DEATHDATE ) ; 4 ) = 0 ; 1 ; 0 );

Case (

// Age in years

Format = 1 ; Year ( DEATHDATE ) - Year ( BIRTHDATE ) - ( ( DayOfYear ( DEATHDATE ) - leapFactor ) < DayOfYear ( BIRTHDATE ) );

What am I doing wrong? The Age field just shows a ?

Is your field a Text field?

  • Author

No it is a calculation and the result is set to Number...

The calculation contains is text, so change it from the default of Number to Text.

Lee

  • Author

Lee, I just cannot get it to work... I have attatched what I have done. Maybe you can see where I am screwing up.

Thanks :)

AgeCalc.zip

That one is NOT a good choice.

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.