function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ShalayShalay 

Finding the Most Recent of 2 Dates

I would like to create a custom formula field that calculates the most recent of 2 custum date fields.  Does anyone have any suggestions?

 

 

Thank you ~ Shalay

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 

Try below formula as reference:

IF (manufacturingDate__c>= ExpiryyDate__c , manufacturingDate__c, ExpiryyDate__c)

 

manufacturingDate__c and ExpiryyDate__c both are the date type custom fields and I have also created a another custom formula field that check the manufacturingDate__c and ExpiryyDate__c by using above formula.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

 

 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 

Try below formula as reference:

IF (manufacturingDate__c>= ExpiryyDate__c , manufacturingDate__c, ExpiryyDate__c)

 

manufacturingDate__c and ExpiryyDate__c both are the date type custom fields and I have also created a another custom formula field that check the manufacturingDate__c and ExpiryyDate__c by using above formula.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

 

 

This was selected as the best answer
ShalayShalay

Thank you for your help!  I'm getting a blank if the Date Re-Signed is blank.  Any suggestions?

 

IF ( Date_Signed__c >= Date_Re_signed__c , Date_Signed__c , Date_Re_signed__c )

 

Thanks again!

Shalay