Re: Variables with times between Midnight and 1:30am

Tech-Archive recommends: Fix windows errors by optimizing your registry



What is your problem? It is just another way of representing the number. It
is still 1:00AM

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
<thesquirrel@xxxxxxxxx> wrote in message
news:1165270048.085044.25520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have an interesting problem, I am writing a function where there are
a few hard coded times for the function to use. I am however having
problems applying a variable value to 1:00 AM. Here is my code for the
variable application

ThirdStart = #1:00:00 AM#

However when I would expect to see the variable (defined as a double)
contain "0.041666666666", the variable contains "4.16666666666667E-02".
If I set the hard coded value to:

ThirdStart = #1:30:00 AM#

The variable contains the expected result of "0.0625".

I have also checked my hardcoded midnight value:

Midnight = #12:00:00 AM#

which also contains the expected value of "0".

This only happens on times between #12:00:01 AM# and #1:29:59 AM#.

Anyone have an answer to this problem? I am programming in Excel 2003
for reference.

Thanks in advance!



.