You need to sign in to do that
Don't have an account?

show Duration hour between two date time field
I Have to show Duration hour between two date time field
First Date – Second Date = Hours:Minutes
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I Have to show Duration hour between two date time field
First Date – Second Date = Hours:Minutes
it's 2 Ways Calculate Duration in hours between the two dates time field
First Solution
First Calculate Minutes between two dates. Then convert hours and minutes . using formula field
Calculate Minutes Formula
( Second_Date__c - Frist_Date__C )*24*60
Convert Minutes in Hours
TEXT(FLOOR( Duration__c / 60))
&' Hours '&
TEXT(MOD( Duration__c ,60))
&' Minutes'
Second Solution
Use Formula Field And Use Return Type is Text
IF(FLOOR(MOD((First_Date_Time_c- Second_Date_Time_c )* 24, 24 )) > 0,
TEXT(FLOOR(MOD((First_Date_Time_c- Second_Date_Time_c )* 24, 24 ))) & " Hours ","")
& TEXT(ROUND(MOD((First_Date_Time_c- Second_Date_Time_c )* 24 * 60, 60 ), 0))
& " Minutes "