Subtracting time Help

  • Thread starter turks67 via AccessMonster.com
  • Start date
T

turks67 via AccessMonster.com

I have to field with time. It should be easy but having lots of problems.
eg 7:00 AM - 8:30 AM = 1:30
11:45 AM - 12:30 PM =0:45

How do I get this to work in access query or report?
 
S

Software-Matters

You can use datediff though the result below will be 90 as in 90mins
DateDiff("n",07.00,08.30)
 
D

Dale_Fye via AccessMonster.com

Date time fields are great for storing Dates and Times, but not durations.

If you have two date/time fields, and want to compute the difference between
them use the datediff function and evaluate the difference in minutes or
seconds.

?DateDiff("n", #07:00#, #08:30#) = 90

If you then need to sum that, or view it in hh:mm format, divide the number
of minutes by (24*60), the # of minutes in a day, and then use the format
command to display that.

HTH
Dale
 

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

Top