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
InspectorInspector 

Time Rollup for billing

I'm guessing this would be a rollup field and would appreciate if someone could point me in the right direction. A custom Billing object captures Start Time and End Time (date fields). I want (End Time - Start Time) = total billable time. All fields would be in one custom object. Thank you in advance. 

jhurstjhurst

Inspector,

 

The issue here is likely with your fields being Date fields.  If you have the start and end dates being the same day, you will get a 0 in the customer field, even though you did some work.  So you may want to use DateTime fields instead.

 

Aside from that, you should be able to create a formula fields fairly easily.  If my fields are StartDate and EndDate the formula would be:

 

EndDate__c -  StartDate__c

 And you will get a whole number of the number of days.  If you use DateTime fields instead of dates, then the number will still be the number of days.  So a 6 hour time difference would result in 0.25 of a day.

 

Hope this helps.

Jay