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

accumulate time

I have a field called Service Engineer.  When this field is filled in, a date/time stamp is filled in, SE Added.  When the Service Engineer field is blanked out another date/time stamp is filled in, SE Removed.  I then have a formula field that subtracts the Removed date from the Added date.  I need to accumulate this if the Service Engineer field is added and removed multiple times.  Is there a way to do this?
ShirishaShirisha (Salesforce Developers) 
Hi Staci,


You need to create the both date fields as formula field to store the date values whenever the field updated with the value or the existing value is deleted.

Once,they are updated then you need to create the formual field to substract the both the date fields which results in number of date.


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
What do I put in the formula for the Date fields?    This doesn't really apply to my situation or I'm failing to connect it with my problem:
IF( NOT(ISBLANK(Last_Contact_Date__c)), TODAY() - Last_Contact_Date__c , 0)