Finding times greater than an entered value

  • Thread starter Thread starter graemej
  • Start date Start date
G

graemej

Guest
I am trying to create a query that will show jobs that have exceeded a given time. So far I have managed to use the dispatched time and completed time fields to return a value that shows how long a job took. My problem is that I only want to view jobs that have exceeded 3 hours, I have tried entering in the criteria field > #03:00# but this dosent seem to return the expected data.
Please help. Many Thanks

Graeme
 
Try adding another field to your query and call it, lets say TimeDif
with this expression Format([DispatchedTime]-[CompletedTime],"General Date")

So the field would look like this:
TimeDif:Format([DispatchedTime]-[CompletedTime],"General Date")

And then in the criteria row for the TimeDif field enter >#03:00#

HTH

DJ

[This message has been edited by DJBummy (edited 07-31-2001).]

[This message has been edited by DJBummy (edited 07-31-2001).]
 
Thanks that worked a treat, I was missing the ,"h") at the end of my original statement. Funny how the simple things can trip you up.

Thanks again.
 
Beware of the "h" format. In my test of the query it was omitting records that had a difference of 3 hrs and 4 mins. It was treating the difference as if it was a 3.
I changed the "h" to "General Date" and the criteria to >#03:00# and the results were better.
I think I may have edited the post after you viewed it.
Sorry

DJ
 

Users who are viewing this thread

Back
Top Bottom