Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Max_Date() and Min_Date() function for Formula Expression

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Karlstens
11 - Venus
11 - Venus
Status: New Ideas
What is the proposed idea/solution?

Frustratingly there's still no Max_Date() or Min_Date() function to use within formula fields. There is obviously Max() and a Min(), but ultimately they're designed for checking numbers and returning the largest or smallest, and not dates.

How does is solve the user problems?

Have a read through this and you'll get an idea of the users struggle. 4 years have passed, and I face this exact same issue again now.

https://community.airtable.com/t5/other-questions/how-do-i-return-the-most-recent-of-two-dates/td-

In my case, I'm trying to write;


MAX(LAST_MODIFIED_TIME({Movie}),LAST_MODIFIED_TIME({Network}))

But unfortunately the Airtable Formula returns a zero. Ultimately, I'd like the ability to write this;

 
MAX_DATE(LAST_MODIFIED_TIME({Movie}),LAST_MODIFIED_TIME({Network}))
or
MIN_DATE(LAST_MODIFIED_TIME({Movie}),LAST_MODIFIED_TIME({Network}))

And have the date returned. Importantly, the above needs to work with an array of dates, and not just two. So for example;

MAX_DATE(LAST_MODIFIED_TIME({Movie}),LAST_MODIFIED_TIME({Network}),LAST_MODIFIED_TIME({Coverage}))
or
MIN_DATE(LAST_MODIFIED_TIME({Movie}),LAST_MODIFIED_TIME({Network}),LAST_MODIFIED_TIME({Coverage}))

 

Who is the target audience?

Anyone who's needing to simply compare an array of dates within a formula field and have the largest (or the smallest) date returned, with the correct date formatting applied to the return.

2 Comments
kuovonne
18 - Pluto
18 - Pluto

This is an excellent product suggestion.

In case you are not aware of the current ways of determining the min/max date in a list of dates, I recently wrote up this explanation which was inspired by this post with a similar situation. (The reference to rollup fields is a bit misleading in that post because the multiple date fields happen to be rollup fields. When you are trying to find a min/max date in a linked record you use a slightly different technique, which is in the thread with my explanation)

Karlstens
11 - Venus
11 - Venus

That's a great formula @kuovonne - the user will eventually go cross-eyed if their base is date heavy, but at least it works as expected with several LAST_MODIFIED_TIME() field returns.

Hoping that the formula field can see Airtable developer love this year (2023).