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

Hello Team,

I need to compare two dates and determine which is the "newer" date. For example, I have a field called "ExitDate". I need to compare whatever the date is in ExitDate, which may be June 19, 2009, and compare it with todays date and determine which is "newer" and place the result in a field.

I can't see how to create what must be an "if/then" statement of some sort.

Let me know what you think.

- Sez

Assuming ExitDate is a date field:

Case ( Get (CurrentDate) > ExitDate ; "Expired" ; "Not yet" )

Or:

Choose (

1 + Sign ( Get (CurrentDate) - ExitDate ) ;

"Future" ; "Today" ; "Past"

)

GetAsDate(Max(ExitDate; Get(CurrentDate)))

Oh, was THAT the question? :B

BTW, if the result is date, then GetAsDate() is not required.

  • Author

Hello Team,

First, thanks for such a quick reply! This really SMA!

I used the following;

GetAsDate(Min(ExitDate; Get(CurrentDate)))

In a calculation field substituting Min for Max and its a perfect solution. Thank you.

If I understand this correctly it is saying;

"Return a date - the "earliest" of the following two dates - exitdate and todays date."

This way, if there is a date in the exit date field that is earlier than todays date, it leaves it alone. Which is exactly what I'm looking for. Again, thank you.

I think the other code posted here is interesting as well, and can see other applications for the concept. I will take note of it.

- Sez

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.