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.

Calculate Age in advance

Featured Replies

My database has an age calculation field, which works fine. I enter the DOB: 8/1/2007 today it will display 1 Y, 0 M

I need the calculation to display the age that the person will have in October 1

How can this be accomplished?

GetAsText(Year(Get ( CurrentDate )) - Year(DOB) - If(GetAsNumber(Get ( CurrentDate ))< Date(Month(DOB); Day(DOB); Year(Get ( CurrentDate ))); 1; 0)) & " Y, " & GetAsText(Mod(Month(Get ( CurrentDate )) - Month(DOB) + 12 - If(Day(Get ( CurrentDate )) < Day(DOB); 1; 0); 12)) &" "&"M"

I appreciate any help

Thanks.

It can be accomplished by using the date of October 1 (which year??!) instead of Get (CurrentDate).

  • 2 weeks later...
  • Author

DOB = 12/3/2004, Current age calculation = 3 Y, 2 M as today.

New Calculation:

GetAsText(Year(Target Date) - Year(DOB) - If(GetAsNumber(Target Date)< Date(Month(DOB); Day(DOB); Year(Target Date)); 1; 0)) & " Y, " & GetAsText(Mod(Month(Target Date) - Month(DOB) + 12 - If(Day(Target Date) < Day(DOB); 1; 0); 12)) &" "&"M"

Target Date = 8/1/2008 -Global Date Field

Age by August, 1 08 = 4 Y, 7 M

Can you help me to fix this and in addition to calculate the days?

Thanks

Edited by Guest

Your calculation returns "3 Y, 7 M" here. In any case, I don't know what the correct result should be, so I wouldn't know how to fix it - see:

http://www.fmforums.com/forum/showtopic.php?tid/189394/#263667

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.