Time subtractions

  • Thread starter quinto via AccessMonster.com
  • Start date
Q

quinto via AccessMonster.com

When I subtract "schedTime" from "ActualTime"
Exp1:[actualtime]-[SchedTime] I cannot tell if the number is negatvive or
postive. I want the query to display the results only therfore I do not see
the schedtime or the actualtime. I would like to display the negative times
with a symbol - or ().

Thanks
Quinto
 
D

Dale_Fye via AccessMonster.com

Are these fields setup as Date/Time data type?

Are you recording when something is sheduled to happen, versus when it
actually happened, or are you recording a duration (eg, 1hr 5 min and 38
seconds) in this field.

Either way, you should be able to use the DateDiff function to determine the
number of finite time intervals (hours, minutes, seconds) between two
date/time values (it will return negative values based on the order of the
two date/time values). Based on your example, I'd do something like:

DateDiff("s", [ScheduledTime], [ActualTime])

to get the number of seconds difference between the two times.

HTH
Dale

When I subtract "schedTime" from "ActualTime"
Exp1:[actualtime]-[SchedTime] I cannot tell if the number is negatvive or
postive. I want the query to display the results only therfore I do not see
the schedtime or the actualtime. I would like to display the negative times
with a symbol - or ().

Thanks
Quinto
 

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