Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Formatting times

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting - Times kristy_6278 Excel Worksheet Functions 1 June 21st 09 10:50 AM
Conditional Formatting Times kimberlyd.[_2_] Excel Discussion (Misc queries) 1 April 22nd 09 08:48 AM
Conditional Formatting for times terry Excel Discussion (Misc queries) 1 March 25th 08 02:16 PM
Formatting Times In Excel panmusic Excel Worksheet Functions 2 April 24th 07 02:00 PM
Formatting values to be Times of day... Al Gillis Excel Discussion (Misc queries) 3 June 17th 06 11:07 PM


All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"