[SalesForce] Start Date and End Date in hours from Activity object

I'm trying to convert the Start Date and End Date, that are part of the standard SFDC Activity object, into hours. It looks like it is not possible to access these two fields (schema names StartDateTime and EndDateTime), from a formula field.

I need to obtain the total number of hours between those to fields.
The idea is to use this value to make further calculations that are possible from a formula.

Anyone could give me an idea on how to accomplish this?
Thanks in advanced!

Best Answer

Agree with @Michael, looks like you are talking about teh Event Object. If you want the number of hours you would go to

Setup -> Customize -> Activities -> Activity Custom Fields

Create a new formula field, of type number, and however many decimal places you want. The formula is below.

(DurationInMinutes / 60)

Just make sure you only add it to event layouts and not Task layouts

Related Topic