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.

Featured Replies

I'm using the wonderfully simple age calc found elsewhere on this board by one of you brilliant calc-heads:

Year(Get(CurrentDate)) - Year(Date of Birth) - (Get(CurrentDate)< Date(Month(Date of Birth); Day(Date of Birth); Year(Get(CurrentDate))))

The only problem is that I need it to show the age in years and months. Can I add a simple line to the above calc to get this to work?

Hi Frink1234,

Okay I'll bite because I just can't help myself. I adore figuring date calculations even though they can always be improved upon ...

Year(Get(CurrentDate)) - Year(Date of Birth) -

If(Get(CurrentDate) < Date(Month(Date of Birth); Day(Date of Birth); Year(Get(CurrentDate))); 1; 0) & " Years, " & Mod(Month(Get(CurrentDate)) - Month(Date of Birth) + 12 -

If(Day(Get(CurrentDate)) < Day(Date of Birth); 1; 0); 12) & " Months"

LaRetta wink.gif

  • Author

An excellent and elegant solution LaRetta!

It took me a minute to realize that I had to change "calculation result is TEXT" from the original equation where "calculation result is NUMBER".

Thank you!

- Frink wink.gif

Apologies for not mentioning the calculation result should be text. I try not to take things for granted, ie, that it would be understood to be text but sometimes I slip. crazy.gif

I'm usually accused of saying too much not too little. wink.gif

BTW, this calculation principle was learned from CobaltSky a few years back, I believe. But I've found myself reviewing all calculations and converting many of them using Let() now that I'm *grokking* it. There are many times that Let() can decrease evaluations particularly where the same test (or a portion) must be repeated. It also displays clearer logic and makes calculations easier to vizualize while I write them (thanks Comment!).

But alas in this case, I see no way to use Let() which would benefit the calculation.

LaRetta

  • Author

No apologies needed. After all, it's good for me to have to figure some things out for myself, that's how I learn. I hope someday I will grok. wink.gif

thank you so much for this.... smile.gif that's all she has to say wink.gif

Create an account or sign in to comment

Important Information

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

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.