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.

Calculation for a person's age !

Featured Replies

  • Newbies

Can anyone provide an age calculation code for an FMP novice??? The way my mind works, I would use four(4)number fields: BirthYear, CurrentYear, BirthMonth and CurrentMonth. Find the DIFFERENCE between the related fields and voila... # of years & # months !!! Just as people say, "I'm 29 years and 6 months." Well, I've tried all the permutations using my 4 fields but...

Question 1: Is there a possible calculation code that would follow my mind's reasoning path : (Using the 4 fields)

Question 2. How would FMP do this calculation :

Specifically.. what fields do I need to create, what operators, and how do I write the formula for FMP's calculation editor ;)

I love FMP but I'm obviously in the twilight zone when it comes to calculations (although I've proudly done several S I M P L E ones!)

This is important to me and your help would be a godsend.

Start with this Thread. Link

  • 1 month later...

Try this

" Year " & (Year(Status(CurrentDate)) - Year(DOB) - If(Status(CurrentDate) < Date(Month(DOB); Day(DOB); Year(Status(CurrentDate))); 1; 0)) &"," &

" Month " & (Mod(Month(Status(CurrentDate)) - Month(DOB) + 12 - If(Day(Status(CurrentDate)) < Day(DOJ); 1; 0); 12)) &"," &

" Day " &

(Today- Date(Month(Status(CurrentDate)) - (Day(DOB) > Day(Status(CurrentDate))); Day(DOB); Year(Today)))

The Status ( ) functions aren't more alive.

They were substituted by the Get ( ) functions.

ALSO

the Today function was substituted by the Get ( CurrentDate ) function.

Note that there is even a typing error ( DOJ instead of DOB ) and that the "If" can be substituded by boolean evaluations.

So, for years and months, you can try this UNSTORED calculation:

Let([

today = Get ( CurrentDate ) ;

Y = Year ( today ) ;

M = Month ( today ) ;

D = Day ( today ) ;

yDOB = Year ( DOB ) ;

mDOB = Month ( DOB ) ;

dDOB = Day ( DOB )

];

Y - yDOB - ( today < Date ( mDOB ; dDOB ; Y ) ) & " years and " & Mod ( M - mDOB + 12 - ( D < dDOB ) ; 12 ) & " months"

)

Thanks for your correction, I try that using old version of filemaker ver 6

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.