I'm trying to build 3 formula's in Notion that does the following:
- Check multiple date properties within the same database for the earliest date, then set the entry in that column to the earliest date.
- Check multiple date properties within the same database for the latest date, then set the entry in that column to the latest date.
- Count the days between the earliest date and the latest date, and return a total number of days.
I've created this formula, and it works between the two properties.
if(prop("DateA") < prop("DateB"), prop("DateA"), prop("DateB"))
But I need to index 5 different date properties, and choose the earliest one:
I've tried this, and it doesn't work:
if((prop("DateA") < prop("DateB")), prop("DateA"), prop("DateB"), if((prop("DateB") < prop("DateC")), prop("DateB"), prop("DateC"), if((prop("DateC") < prop("DateD")), prop("DateC"), prop("DateD"),
fromTimestamp(toNumber(""))))
Any help or guidance writing these formulas would be greatly appreciated!