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.

Get age from birthday and Today

Featured Replies

Hi there,

I am trying to subtract two fields to get the age but I got a wrong calculation. I tried to use Getastext but I am missing something. Please help

Today : Get(CurrentDate)

Birthday : Text

Age : Number

After converting the birthdate to a date, as Kris said, you can use this calc:

Let([
     g.today = Get(CurrentDate);

     ElapsedYears=Year(g.today) - Year(birthDate) - If(g.today <Date(Month(birthDate); Day(birthDate); Year(g.today)); 1; 0);

     ElapsedMonths =Mod(Month(g.today) - Month(birthDate) + 12 - If(Day(g.today) < Day(birthDate); 1; 0); 12);


     ElapsedDays = Day(g.today) - Day(birthDate) + If(Day(g.today) ≥ Day(birthDate); 0;
 
          If(Day(g.today - Day(g.today)) < Day(birthDate); Day(birthDate); Day(g.today - Day(g.today))))
];



If(birthDate="";"";
     ElapsedYears & " Year" & 
If(ElapsedYears  =  1; "";"s") & ", " 
    

& ElapsedMonths & " Month" & 
If(ElapsedMonths = 1; ""; "s" ) & ", "
    

& ElapsedDays & " Day" & 
If(ElapsedDays =1; ""; "s")


)
)

 

Edited by doughemi

  • Author

Thanks for your posts.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.