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
 
Top