PDA

View Full Version : Solved: finding the difference in time



tkaplan
01-14-2008, 12:38 PM
hello all,

columns a stores the start time, column b stores the end time. i would like column c to show the difference between the times. there are no dates in any of the columns and i am running into negative time issues because column b is sometimes after midnight and column a is before. what would be the correct formula to put in column c ?

thanks in advance!

Bob Phillips
01-14-2008, 01:51 PM
=MOD(B1-A1,1)

tkaplan
01-14-2008, 03:40 PM
thanks!
can you please explain the mod function and variables?

thanks again!

Bob Phillips
01-14-2008, 03:52 PM
Returns the remainder after number is divided by divisor. The result has the same sign as divisor.

The critical thing is that MOD effectively subtracts the divisor multiplied by the integer portion of the number divided by the divisor from the number. So Mod(1.3, 1) is .3, but Mod(-1.3, 1) is .7.