Nov 03, 2022 08:15 AM
Hi everyone, I need to have a “Filter” column that is pulling date values from 3-4 different columns and selecting the one that is the most recent. So if we have 3/10/2021, 3/10/2022 and 3/10/2023, the date that populates the “Filter” column is 3/10/2023. It’s not always consistent which column will have the most updated date.
Is that possible to write a formula for?
Update:
MAX () doesn’t seem to work for anything other than Number fields.
Desired outcome is to look at multiple Date column values, pull latest date value or if all the values are the same, output the same value.
Solved! Go to Solution.
Nov 04, 2022 05:08 AM
So, @esu, combining @Kamille_Parks’ and @kuovonne’s contributions above, this is what your resulting formula would look like.
As Kuovonne mentioned above, this would allow you to use times in your date fields as well, but would work equally fine with just dates alone:
IF(
OR({Date 1}, {Date 2}, {Date 3}),
DATETIME_PARSE(
MAX(
IF({Date 1}, VALUE(DATETIME_FORMAT({Date 1}, 'x'))),
IF({Date 2}, VALUE(DATETIME_FORMAT({Date 2}, 'x'))),
IF({Date 3}, VALUE(DATETIME_FORMAT({Date 3}, 'x')))
),
'YYYYMMDD'
)
)
Nov 04, 2022 06:26 AM
ahhh thank you so much @Kamille_Parks @kuovonne @ScottWorld !!
Dec 08, 2023 06:46 AM