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.

calculation between two dates

Featured Replies

I am trying to calculate a value as an "If" function but I can't seem to get it to work...

I am trying to create a calculation that will take in consideration the following.

If a "date_field" is between dates1 and dates 2, calculate result,

If a "date_field" is between Dates3 and Dates 4, calculate result.

I cannot seem to get this 2 work... I can view records in table based on a date from and to but cannot work out the calculation for this result..

TIA

Does this work?

Case (Date_Field ≤ Date1 and Date_Field  ≥  Date2;result1;Date_Field ≤ Date3 and Date_Field  ≥  Date4;result2;default result)

Does this work?

Case (Date_Field ≤ Date1 and Date_Field ≥ Date2 ; result1 ; Date_Field ≤ Date3 and Date_Field ≥ Date4 ; result2 ; default result)

I don't believe that fits the criteria of 'between'.

[color:gray]Date_Field ≤ Date1 and Date_Field ≥ Date2

To get between (inclusive), I would suggest reversing, as: Date_Field [color:red]≥ Date1 and Date_Field [color:red]≤ Date2 ; result1. I assume that's what you meant but I wanted to clarify. :wink2:

  • Author

Thanks jstaphse, and yes to clarify, and I always put these wrong way round first of all...

LaRettas adjustment is correct...

This works perfectly, thankyou.

Thanks for correcting that LaRetta. I knew it was too early for that reply. ???

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.