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
Ricky MartinRicky Martin 

How to Caluculate the Out of Office Hour In Salesforce

I have the three filed like below and I want to calculate the number of out of office hour.

Office hour is : 9:00 to 18:00

Fields :

In Time : date time filed Out Time : date time filed

No. of Out of Office Hour : ?

ex: In time : 1-1-2014 19:00 Out time : 1-2-2014 07:00

No. of Out of Office Hour : 12 hrs.

Kindly let us know, how to calculate in apex trigger / class
pradeep naredlapradeep naredla
hai martin,

Do u want a trigger that will populate the working hours automatically depending on the in/out fields.
 
Ramu_SFDCRamu_SFDC
The below article seems promising

http://www.interactiveties.com/b_apex_time_duration.php#.U3WyhvlmPg0