View Single Post
  #12   Report Post  
Myrna Larson
 
Posts: n/a
Default

I tried these 3 formulas (start time in A1, end time in B1)

=(TEXT(B1,"00\:00")-TEXT(A1,"00\:00"))*1440
=INT(B1/100)*60+MOD(B1,100)-(INT(A1/100)*60+MOD(A1,100))
=B1-A1-(INT(B1/100)-INT(A1/100))*40

The times were 105.6, 77.4, and 76.6 microseconds, respectively.


On Sat, 22 Jan 2005 23:08:37 -0800, "Harlan Grove" wrote:

"Myrna Larson" wrote...
FWIW, since you refer to the number of function calls, I assume your
concern is with speed. Your proposed formula may be shorter, but if
speed is the issue, arithmetic functions generally beat text/string
functions (plus under-the-hood conversion of text to dates/times).

...

Good point. Wanna time

=A2-A1-(INT(A2/100)-INT(A1/100))*40

?