+ Start a Discussion
Marco SantosMarco Santos 

Formula Field

Hi
Could anybody help me with a formula field? Namely how I can use formula to choose the latest date for example:

DateA__c = 09/09/2013
DateB__c = 11/10/2014
DateC__c = 01/01/2010

Thanks in advance
Best Answer chosen by Marco Santos
sharathchandra thukkanisharathchandra thukkani
try to arrange date a, b and c in descending order using trigger use some sorting algorithm and get the maximun date. if you want to go with formula field then use if(a>b && a>c,a,if(b>a && b>c,b,c))

All Answers

sharathchandra thukkanisharathchandra thukkani
try to arrange date a, b and c in descending order using trigger use some sorting algorithm and get the maximun date. if you want to go with formula field then use if(a>b && a>c,a,if(b>a && b>c,b,c))
This was selected as the best answer
Marco SantosMarco Santos
Hi,

Thanks for the reply sharathchandra thukkani it is exactly what I was looking for :)

Although could I ask you or somebody else could tell me how to change this formula to choose the latest date for example how to modify this formula to choose the latest date from 3 fields when 2 of them are empty as currently it is working only when all 3 field are populated with dates?

Thank in advance