0

I am using this formula field to calculate the hour and minute difference between a start and end time

Start Time :14:00:00.000Z
End Time : 16:50:00.000Z

and I am using this formula field to calculate the difference

(VALUE(LEFT(TEXT(End_Time__c), FIND(":",TEXT(End_Time__c))-1))  * 60 + VALUE(MID(TEXT(End_Time__c),FIND(":",TEXT(End_Time__c))+1,2)) - 
VALUE(LEFT(TEXT(Start_Time__c), FIND(":",TEXT(Start_Time__c))-1))  * 60 + VALUE(MID(TEXT(Start_Time__c),FIND(":",TEXT(Start_Time__c))+1,2))) / 60

But I am getting 2.83 as output but original output has to be 2.50. Not sure what I am missing here

1 Answer 1

0

Some how achieved this by first separate the minutes after . by MID function. So in my case it will be 83. After that Multiply by 60 and divide by 10000 and ie,

83*60/10000 which will give output as .498 and rounding it by 2 will give 0.50

after that LEFT(2.83,FIND(".",2.83)-1) will give 2

So finally 2 + 0.50 = 2.50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .