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
EIE50EIE50 

Simple Time Difference Formula Help

Hi,

 

I have two fields (of date/time data type) called InTime , OutTime. I have one more formula field (formula type) called Total to calculate the number of hours between InTime and OutTime.

 

Can some one hlep me with the formula please?

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
Shashikant SharmaShashikant Sharma

Just create a formula field return type as Number

 

(DateTimeField2__c - DateTimeField1__c)*24

 

 

All Answers

Shashikant SharmaShashikant Sharma

Just create a formula field return type as Number

 

(DateTimeField2__c - DateTimeField1__c)*24

 

 

This was selected as the best answer
EIE50EIE50

Thank you.