Discussions

Expand all | Collapse all

How do I return the maximum date from multiple date fields but only if not greater than today?

  • 1.  How do I return the maximum date from multiple date fields but only if not greater than today?

    Posted 08-21-2018 15:20
    Ultimately I want to send a reminder on the same date as a specific recurring event from a list of 15 multiple date fields.  So I am trying to create a formula field that returns the maximum date that is not greater than today.
    I can get the max - but I haven't been able to use an IF function to exclude dates in the future.

    Here is an example using just 3 of the 15 fields:
    Max([MRI 3 Month], [MRI 6 Month],[MRI  9 Month])

    Your help is appreciated.  I find QuickBase so useful in our healthcare environments, but unfortunately, my nursing training is not helpful when trying to write formulas!


  • 2.  RE: How do I return the maximum date from multiple date fields but only if not greater than today?

    Posted 08-21-2018 15:31
    Try this:
    Max(
      If([MRI 3 Month] <= Today(), [MRI 3 Month]),
      If([MRI 6 Month] <= Today(), [MRI 6 Month]), 
      If([MRI 9 Month] <= Today(), [MRI 9 Month])
    )