Finding times greater than an entered value (1 Viewer)

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
 

DJBummy

Registered User.
Local time
Today, 00:34
Joined
Jun 22, 2001
Messages
90
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).]
 
G

graemej

Guest
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.
 

DJBummy

Registered User.
Local time
Today, 00:34
Joined
Jun 22, 2001
Messages
90
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

Top Bottom