HowTo: Multiply duration (time) with numeric value
Posted: Wed Apr 27, 2016 2:25 am
This HowTo describes how to multiply a duration (formatted and input as time: hh:mm:ss) with a numeric value.
For example, to calculate the sum to charge for a duration, depending how much it costs per hour:
This should represent line 1 in a table, and what to put into each cell.
The trick to multiply with a time duration is, to multiply it by 24 - to get the value in hours.
If you want minutes, multiply the duration by 24, then by 60:
For example, to calculate the sum to charge for a duration, depending how much it costs per hour:
Code: Select all
A1(start_time): hh:mm:ss
B1(end_time): hh:mm:ss
C1(duration): =B1-A1
D1(price_per_hour): 140
E1(sum): =C1*24*D1
The trick to multiply with a time duration is, to multiply it by 24 - to get the value in hours.
If you want minutes, multiply the duration by 24, then by 60:
Code: Select all
F1(minutes): =C1*24*60