View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Formatting times

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)

"SmilingPolitely" wrote in message
. au...
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?