Gallery
Formulas - No Experience Required Reference
Share
Explore

Additional Bonus Formula!

Earliest Formula Between Three Dates Formula 1: Days Since First {Date} Review: TODAY()-Date = The Number of Days between that date and Today TODAY()-10/10/2020 = 990 ​Requirement - I want to find the earliest formula between three different date fields Simple solution for Formula beginners, Write Two Formulas Formula #1: Type: Number Use Max function to compare the three date fields.
MAX (IF( NOT( ISBLANK( Date1 ) ) , TODAY() - Date1, IF( NOT( ISBLANK(Date2 ) , TODAY() - Date2, IF( NOT( ISBLANK(Date3 ) , TODAY() - Date3,0 )))
This field determines the number of days between all the dates and determines which is the largest. Date1 = 10/27/2022 Date 2 = 04/29/2021 Date 3 = 11/13/2021 Looking at this you easily see this on that April 29, 2021 is earliest. What the formula is doing is looking at these numbers and determining which number is the largest: Today()-10/27/2021 = 608 days Today()-11/13/2021 = 591 days Today()-04/29/2021 = 789 days We are telling Salesforce to fill in the number that is largest of the three equations above and to only evaluate the date field if it is not blank.
Formula #2: Type: Date
Earliest Date between 3 dates If you want to know what date that was 30 days ago, you can subtract 30 from Today and get a date field. Today()-30 =05/28/2023 CASE can be a multiple “If” formula
CASE(TODAY() - DaysSinceFirstDate, Date1 , Date1, Date2 , Date2, Date 3, Date 3, NULL)
Determines which Date field is First when subtracted from today, by matching Days Since First Date Formula.










Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.