Formatting times

S

SmilingPolitely

I am trying to write a function to display the time elapsed since
StartTime and Now() and have it formatted as H:mm:ss

I tried this code:

Format(DateDiff("s", StartTime, Now()), "H:mm:ss")

but without result.

Can someone please help?
 
B

Bob Phillips

Try this

Debug.Print Format(Now() - starttime, "H:mm:ss")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top