Sorry, I'm sure it's been asked before...
I am using a time stamp in B2 to clock in, and a time stamp in C2 to clock out, and the following in D2 to calculate elapsed time:
(every time I post my formula it gets truncated) =IF(C2<b2,c2+1,c2)-b2><b2,c2+1,c2)-b2">
Here it is with spaces added so...