#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default serial time

Using subtraction I see that one second in serial time equals
1.15740740740389E-05. I'm supposed to calculate the difference between two
times. Is it OK to use this number as a basis for calculating the times and
the differences between them?

This way milliseconds will play a role even though I don't really need to
display them. (I need to be able to show that 4:17:26.9 is earlier than
4:17:27.0 even though they'll both display as 4:12:27.)

Is this an OK shortcut to take when dealing with times? Are there any side
effects that I need to know about?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default serial time

just do a comparison if that is your end result

if Range("C1").Value < Range("D1").Value then

if you need to divide by seconds, use

timeserial(0,0,1)

anyway, I get: 0.0000115740740740741

which seems correct for a repeating decimal.

--
Regards,
Tom Ogilvy




"David Gerstman" wrote:

Using subtraction I see that one second in serial time equals
1.15740740740389E-05. I'm supposed to calculate the difference between two
times. Is it OK to use this number as a basis for calculating the times and
the differences between them?

This way milliseconds will play a role even though I don't really need to
display them. (I need to be able to show that 4:17:26.9 is earlier than
4:17:27.0 even though they'll both display as 4:12:27.)

Is this an OK shortcut to take when dealing with times? Are there any side
effects that I need to know about?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default serial time

forgot to add:
from the immediate window:

? 1#/(24#*60#*60#)
1.15740740740741E-05

--
Regards,
Tom Ogilvy


"David Gerstman" wrote:

Using subtraction I see that one second in serial time equals
1.15740740740389E-05. I'm supposed to calculate the difference between two
times. Is it OK to use this number as a basis for calculating the times and
the differences between them?

This way milliseconds will play a role even though I don't really need to
display them. (I need to be able to show that 4:17:26.9 is earlier than
4:17:27.0 even though they'll both display as 4:12:27.)

Is this an OK shortcut to take when dealing with times? Are there any side
effects that I need to know about?


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
Time Serial ma1000 Excel Discussion (Misc queries) 4 October 29th 08 06:32 AM
time serial number Bob Gotti Excel Discussion (Misc queries) 8 November 6th 07 08:43 PM
Converting date/time serial values to cumulative time totals... Kevin B Excel Discussion (Misc queries) 4 October 18th 07 05:05 PM
Format serial date and time Cedric Excel Discussion (Misc queries) 2 December 26th 05 09:06 PM
time serial number problem Tom Ogilvy Excel Programming 0 September 9th 03 03:56 PM


All times are GMT +1. The time now is 11:24 PM.

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

About Us

"It's about Microsoft Excel"