G
Gary Keramidas
if i want to time an operation, can i format the result from the start time to the end time in seconds and fractions of a second, rather than just whole seconds?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if i want to time an operation, can i format the result from the start time to the end time in seconds and fractions of a second, rather than just whole seconds?
Ron Rosenfeld said:if i want to time an operation, can i format the result from the start time to
the end time in seconds and fractions of a second, rather than just whole
seconds?
You could format your result as.000
--ron
time to the end time in seconds and fractions of a second, rather than
just whole seconds?
You could format your result as.000
thanks. don't know what i'm doing wrong, but when i set the start time to
now, and the end time to now and then subtract, i get something like this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
Rick Rothstein (MVP - VB) said:if i want to time an operation, can i format the result from the start time
to the end time in seconds and fractions of a second, rather than just whole
seconds?
You could format your result as.000
thanks. don't know what i'm doing wrong, but when i set the start time to
now, and the end time to now and then subtract, i get something like this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
Well, the format that Ron gave you will only display 3 decimal places, the
number you posted is
0.0000810185156296939
with the power of 10 part multiplied through, which, if you notice, has 4
zeroes after the decimal point. That number, rounded to 3 decimal places is 0.
Rick
Rick Rothstein (MVP - VB) said:if i want to time an operation, can i format the result from the start time
to the end time in seconds and fractions of a second, rather than just whole
seconds?
You could format your result as.000
thanks. don't know what i'm doing wrong, but when i set the start time to
now, and the end time to now and then subtract, i get something like this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
Well, the format that Ron gave you will only display 3 decimal places, the
number you posted is
0.0000810185156296939
with the power of 10 part multiplied through, which, if you notice, has 4
zeroes after the decimal point. That number, rounded to 3 decimal places is 0.
Rick
Gary Keramidas said:but it should display 3 or 4 seconds.
how do i get it so i can show how many seconds the routine runs? i have 3
different scenarios, i know which is faster, i'm just looking to time
them.
thanks
--
Gary
Rick Rothstein (MVP - VB) said:if i want to time an operation, can i format the result from the start
time to the end time in seconds and fractions of a second, rather than
just whole seconds?
You could format your result as.000
thanks. don't know what i'm doing wrong, but when i set the start time
to now, and the end time to now and then subtract, i get something like
this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
Well, the format that Ron gave you will only display 3 decimal places,
the number you posted is
0.0000810185156296939
with the power of 10 part multiplied through, which, if you notice, has 4
zeroes after the decimal point. That number, rounded to 3 decimal places
is 0.
Rick
Well, the format that Ron gave you will only display 3 decimal places, the
number you posted is
0.0000810185156296939
Tim Williams said:Your number 8.10185156296939E-05 most likely represents a fraction of a day.
Try multiplying it by 24*60*60 (# of secs in a day) before formatting or
rounding to 3 dp
I get 6.9999997
Tim
Gary Keramidas said:but it should display 3 or 4 seconds.
how do i get it so i can show how many seconds the routine runs? i have 3
different scenarios, i know which is faster, i'm just looking to time them.
thanks
--
Gary
Rick Rothstein (MVP - VB) said:if i want to time an operation, can i format the result from the start
time to the end time in seconds and fractions of a second, rather than
just whole seconds?
You could format your result as.000
thanks. don't know what i'm doing wrong, but when i set the start time to
now, and the end time to now and then subtract, i get something like this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
Well, the format that Ron gave you will only display 3 decimal places, the
number you posted is
0.0000810185156296939
with the power of 10 part multiplied through, which, if you notice, has 4
zeroes after the decimal point. That number, rounded to 3 decimal places is
0.
Rick
thanks. don't know what i'm doing wrong, but when i set the start time to now,
and the end time to now and then subtract, i get something like this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
Ron Rosenfeld said:thanks. don't know what i'm doing wrong, but when i set the start time to now,
and the end time to now and then subtract, i get something like this:
8.10185156296939E-05
when i try to format the output like you suggested, i get zeroes.
When I format your value: 8.10185156296939E-05 as.000 I get 7.000
(seconds)
That is precise to three decimal places, which is as good as you will get
using
a time format.
If you want more precision than thousandths of a second is required (and that
might be the case if you have very very accurate time determining techniques),
then you should not be using Excel time format.
Excel stores time as a fraction of a day. So 8.10185156296939E-05 is equal to
6.999999750405550 seconds. Rounded to thousandths of a second, it is 7.000
seconds.
--ron
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.