Formula to find the day difference between two Dates

Scenario: In the vendor record, we have a status called ‘Charity Status’. While creating a vendor record, the status is set to ‘Initial contact’. The status of the vendor will converted to ‘Approved – Active’ after a time period. So the requirement is to calculate the number of days from the ‘Initial contact’ date/ create date until the day on which it becomes ‘Approved Active’ status.

Use the Formula (Numeric) field with Summary type as ‘SUM’:

ROUND(MAX(CASE WHEN {systemnotes.newvalue} = {custentity_charity_status} THEN {systemnotes.date} ELSE {datecreated} END) - MAX(CASE WHEN {systemnotes.newvalue} = 'Initial Contact' THEN {systemnotes.date} ELSE {datecreated} END))

Leave a comment

Your email address will not be published. Required fields are marked *