+ Start a Discussion

How to sum "billable hours" from Events on a custom object?

I have a custom object with activities (events or tasks; they confuse me) to record hours worked (start datetime and end datetime). How can I sum the hours worked both on the activity, and on the custom object for all activities?
I could also use another custom object instead of Activities.
Thank you.
You'd need to write an apex trigger to use activities in this way.  Using a custom object to capture start/end date time would be more straightforward, as you could then create a formula field to figure out the difference between the two datetimes (example at : http://stackoverflow.com/questions/11126378/salesforce-formula-calculate-business-hours-between-two-dates), and create a roll up summary that totals all of the child record formula fields.
Event object has StartDate and EndDate field. These fields can be utilized to calculate hours. Use of cutom object may not be useful as Event object is built for these type of requirement. Custom object will require lot of thinking and development effort and still require a triiger to acheive results.
@Avillon : A custom object won't require a trigger - this is a classic use case for a rollup summary.