View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Jon Stickings Jon Stickings is offline
external usenet poster
 
Posts: 3
Default Comparing time values which have milliseconds in them e.g 10:2

Hi Benjo,

Thanks for the reply. Going to go with JE's reply as this works and is
easy, but thanks for taking the time to answer anyway.

Cheers, Jon
--
Jon Stickings


"Benjo" wrote:

I believe number formats don't affect the numbers or the interpretations
thereof, just the display.

If you could read in (open) the text data file and have excel treat the
colon as a separator, you'd have the hours, minutes and seconds in diferent
columns. Then calculate the time value, where excel uses the number's
integer portion to be the day, and the decimal portion to be the time of day.
(ie. .25=6am, .5=Noon, .75=6p, etc.)

Therefore hh/24 + mm/(24*60) + ss.ms/(24*60*60) = time of day.
--Just a lurker.

"Jon Stickings" wrote:

Hi All,

As part of a performance test that I am going to be running, I am planning
to extract some time values from the application under test log files, paste
the values into Excel and calculate the time taken for certain transactions.
I have been looking into this and have become stuck because the time values
in the log are in the format <hh:mm:ss:msmsms where ms is for milliseconds.
My plan was to substract one value from the other, thus getting the
difference which would be the time taken for the transaction e.g. (cell
A1)10:20:30.400 (cell B1)10:20:40.500 Formula in cell C1 would be =B1-A1.
This is expected to return the value of 00:00:10.100. However, all that is
returned is #VALUE!. The formula works fine without the milliseconds, but as
I am doing a performance test, I need to use milliseconds.

I have messed about with the format of the cell/time, but have not been
successful.

Any help in this matter is very much appreciated.

Regards, Jon
--
Jon Stickings