You need to sign in to do that
Don't have an account?
dtooker
Calculation for time
Hi
I have a BeginDateTime and a EndDateTime also with a time offset in Hours. Is there a formula where I can take the EndDateTime subtract the BeginDateTime + the TimeOffset in hours to get a total time. Here is an example
BeginDateTime 11/1/06 9:35 PM
EndDateTime 11/1/06 11:45 PM
TimeOffset = 2
So I want to take 11/1/06 11:45PM - (11/1/06 9:35PM + 2hrs) should get calculated number field of .17 for the total hours or 10 minutes.
here is what my formula looks like now
(({!End_Date__c} - ({!Begin_Date__c} + {!Time_Offset__c}) ) * 24
Thank you
In case anyone else has this problem I have come up with working solution. It looks like you need to divide the hours (TimeOffset) by 24. The end result was:
( {!Begin_Date__c} - ( {!Event_Date__c} - ({!Time_Offset__c}/24)) ) * 24
Here is an HH:MM:SS formula that some might also find interesting. It is basic amount of time since created but can be modified to show the time open for a case if needed.
Text(FLOOR((NOW() - {!CreatedDate}) * 24))
&":"&Text(FLOOR(((NOW() - {!CreatedDate}) * 24 - FLOOR((NOW() -{!CreatedDate}) * 24))* 60))
&":"&Text(FLOOR((((NOW() - {!CreatedDate}) * 24 - FLOOR((NOW() - {!CreatedDate}) * 24 ))* 60 - FLOOR(((NOW() - {!CreatedDate}) * 24 - FLOOR((NOW() -{!CreatedDate}) * 24 )) * 60 )) * 60 ))
Chris