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
justajaynejustajayne 

Calculating elapsed time of a call (or call duration) - Please Help :)

I have seen some formulas regarding elapsed time calculations however, they seem to be much more complex than my needs.
My current problem is two fold:
 
1. Problem with IF statement (unavailable field)
I currently have a call start time field (defaulted Now function with date/time data type) on the Task Page layout as well as a call end time field which allows the end user to manually enter this data. What I would like to do is create an IF statement that will only enters the Now default if the subject of the task is "Call". This field resides on the task page layout. When I attempt to plug in the test segment of the IF statement however the field is not located in the available Insert merge field list and I receive the following error:
 
Field subject does not exist.  
 
2. The second part of my problem is calculating the elapsed time. I initially thought that I could simply create a field with a formula data type and subtract the call end time from the call start time however this does not work (formula return type = number). This formula is returning a decimal value as the result which is completely incorrect.
 
It would be greatly appreciated if someone could help me out!!!!!!
 
Thanks in advance :)
 
Best Answer chosen by Admin (Salesforce Developers) 
justajaynejustajayne

I figured out the formula!!!!!!!

 

Here it is in case anyone has a similar problem :smileyhappy:

(call end time - call start time) *1440

 

All Answers

justajaynejustajayne

I figured out the formula!!!!!!!

 

Here it is in case anyone has a similar problem :smileyhappy:

(call end time - call start time) *1440

 

This was selected as the best answer
dzkatzdzkatz

Hi,

 

I'm trying to create a date/time formula that will find the length of an event based on event start and end time.

 

When I tried entering the formula "Event End Time - Event Start Time" I found the following error:

 

Error: Formula result is data type (Number), incompatible with expected data type (Date/Time).

 

Any help/suggestions or a point in the right direction would be very helpful. Thanks for your time!

 

D

bhanu_prakashbhanu_prakash
Hi dzkatz

change data type :  Number  into Date/Time