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
Raghu RamanRaghu Raman 

Calculate No of Days Between two Status

Hi,

I need to create a report on a custom object and calculate no of days between status.

For example, I need to calculate the number of days between status Approved and Closed. How long it took to Close after Approved ?

Regards,
Raghu
MissedCallMissedCall
There are several ways to do it. 

A dirty way to do it is, have 2 custom fields of data type date. When status is approved, copy the date last modified to the 1st cusotm field and when status is closed, copy the date last modified to 2nd custom field. Then do a delta between these 2 fields to derive your number of days which can go in to your 3rd custom field. If you want to get down to a level of hours then make your data types to date time instead of date. 
Raghu RamanRaghu Raman
What are the other ways ... since its not just two status we have couple more , so it will lot of fields...