Hello,
I have a formula which currently calculates the difference between the Last Modified Date and the Date field (a custom Date field). Formula is:
DATEVALUE(LastModifiedDate) - Date__c
Formula is correct, so for the below record field "Gap Days" is calculated as follows:
Gap Days= LastModifiedDate - Date__c= 8/5/26 - 28/5/26 = -20
The "issue" is i am scratching my head whether it should be negative or just indicate the number "20".
Question: Should i change it to "Date__c - LastModifiedDate" , so that it isn't negative? The Date field is a the date a salesperson has has a meeting so i'm guessing the LastModified will always be after the Meeting Date - Am i missing anything?
#Formulas
In any case, everything will depend on what you need the value of the 'Gap' to reflect. In case you need to determine how many days have gone after the meeting, then your formula is fine, only the returned result should be positive, otherwise you can simply move the dates in your formula around. In case you need just a positive value irrespective of what date is earlier, you can simply put an ABS function around your formula:
ABS(DATEVALUE(LastModifiedDate) - Date__c)
Now you won't need to change anything if someday a meeting date changes position!