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.

Todays Date Minus Creation Date Equals......

Featured Replies

  • Newbies

I need to make a calculation that will calculate in a field every time the database is opened. The calculation will calculate Todays Date - Creation Date and generate a number of days elapsed result. I know doing a calculation will make the database open slowly because it has to calculate every record upon opening, but how else can you age the records based upon the above parameters. I don't want to have to press a script button every day. Thanks for your help!

You can use a startup script to set a global data field (gCurrentDate) to Status(CurrentDate) and define a calculation:

Age (calculation, number) = gCurrentDate - Creation Date

Since the global is not stored, all the records will not have to be updated. The disadvantages of this approach are:

1) The result (Age) is not indexed and finds on the Age field will be slow

2) If the file is opened by a relationship, the startup script won't run and the Age value may be incorrect.

-bd

Hello,

The database does not have to calculate every record upon opening if you use a calculated field like status(currentdate)- field(date created).

Status(current date) was introduced to replace the today function, which does calculate every record when opened.

Any calculated field that has "today" in it, should be replaced with status(currentdate).

=)

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.