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

Quick question:

I have a calculation field set to calculate age:

(TODAY - Current Date)/365.25

This works, but the field either rounds the age up or returns 32.99 years old or 18.24 years old, etc. How can I make this calculation field always round DOWN to the nearest full integer (no decimals or rounding up)?

Shane

isn't Today dead in 7? and isn't Today and Current Date the same Date?

I don't have 7, so this maybe easier. Here is the calculation I use in v6.

(Year(ReferenceDate) - Year(Birthday) - If((ReferenceDate) < Date(Month(Birthday), Day(Birthday), Year(ReferenceDate)), 1,0))&" "&"Years,"&" "& Mod(Month(ReferenceDate) - Month(Birthday) + 12 - If((Day(ReferenceDate) < Day(Birthday)),1,0),12)&" "&" months,"&" "&"and " & Round(Mod(Day(ReferenceDate) - Day(Birthday) + 30.42+1 - If((Day(ReferenceDate) < Day(Birthday)),1,0),31),0) &" days."

Text result.

Lee

  • Author

Sorry,

I meant:

(TODAY - Date of Birth)/365.25

"TODAY" does seem to work, at least for me, in 7.

Shane

  • Newbies

If you just want to see the years, this might work: Truncate( (Status(CurrentDate)-birthday)/365.25, 0). Use status (currentdate) not today() and make the field unstored if you can.

Hope this helps

The Floor function may be what you're looking for in version 7.

Here's a tweaked version of Lee's calc, combining the text that need not be separated, simplifying the already booleanized Ifs, and changing commas to semicolons for version 7, if this suits your needs...

Year(ReferenceDate) - Year(Birthday) - (ReferenceDate < Date(Month(Birthday); Day(Birthday); Year(ReferenceDate))) & " Years, " & Mod(Month(ReferenceDate) - Month(Birthday) + 12 - (Day(ReferenceDate) < Day(Birthday)); 12) & " months, and " & Round(Mod(Day(ReferenceDate) - Day(Birthday) + 30.42 + 1 - (Day(ReferenceDate) < Day(Birthday)); 31); 0) & " days"

  • Author

Thank you Lee and Queue,

I justed needed the year only, so I modified and deleted the portion not needed. Also, Lee, I was wrong, I had TODAY listed as a field in my table referenced to the CurrentDate. Sorry.

Shane

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.