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.

Calculating with a date field

Featured Replies

  • Newbies

Hi

I need the following and I think I can do it in a calculation field, but have also thought of a script.

Field A is a date field. I want field B to contain the date of field A minus 60 days. But if the new date is less than today's date then it should display today's date.

Can anyone help me with constructing fiels B?

Kind regards, Mille

Try:

Max ( FieldA - 60 ; Get (CurrentDate) )

This looks like it should be done in an unstored calculation field - if you do it by script, then "today's date" will be the date on which the script ran.

I've not used the Max function a great deal, so I'd try comment's suggestion first, but this should work too:

Let(

D = FieldA - 60

;

If( D < Get( CurrentDate ) ; Get( CurrentDate ) ; D )

)

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.