In Access 2000 - How do I add up time beyond 24 hrs

  • Thread starter Thread starter Guest
  • Start date Start date
Nelville,
You'll need to include the date associated with each time.
DateDiff("h",Now(),[YourDate]+[YourTime])
would calculate the number of hours between Now, and your Date/Time values.
 
This can be a problem. If the goal is to calculate the number of hours to do
a task, often it's better to put this data into a number field and not
date/time.

If you need to extract such data from date/time entries, it's probably
better to convert it to a number.

Debug.Print CDbl(Now()- Date()) = 0.347245370372548 at 8:20am. So that
number converts to 8 hours and 20 minutes or just a little over a third of a
day.

You could also use the Hour and Minute functions to extra those parts of a
time.

Debug.Print Hour(Now()) = 8 at 8:24 AM
 
I have some knowledge on this, I have a work order database that displays
elapsedtime as days hours minutes seconds
elapsedshorttime as hh:mm:ss
decimalequiv as 00.00

All the information you seek is available at microsoft online help. I
created a module called elapsed time and have all the functions inside there
for easy retrieval from code or macro. Here is a good place to start

http://support.microsoft.com/?scid=kb;en-us;210276&spid=2509&sid=202

HTH
 

Ask a Question

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.

Ask a Question

Back
Top