Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Variables with times between Midnight and 1:30am

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Variables with times between Midnight and 1:30am

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)
wrote in message
ups.com...
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!



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
Is this possible - 2 times 2 variables Maxime Maugeais Charts and Charting in Excel 2 February 2nd 08 07:28 PM
After midnight Steved Excel Worksheet Functions 3 December 12th 07 02:31 AM
Time after midnight Steved Excel Worksheet Functions 2 May 30th 07 08:10 PM
Timesheet, overtime with daytime from 7:30am to 16:30pm Arkon Excel Discussion (Misc queries) 2 October 1st 06 10:13 PM
How do I sum up a column hours, like 9:30am - 5:30pm, in Excel? PJ Setting up and Configuration of Excel 6 September 5th 06 04:37 PM


All times are GMT +1. The time now is 06:32 AM.

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"