5 minutes interval

Markvand

Registered User.
Local time
Today, 17:25
Joined
Jul 13, 2004
Messages
88
I have a query that shows a list from GPS software (car fleet management), unfortunately the software is not capable of doing a decent reports thus I'm trying to use its data and do it myself.

The table structure is as follow:

Car, Date, Time, Position.

The time interval I have now is 1 minute (short time format), I don't need it so detailed, that's why I was thinking to limit this into 5 minutes interval.

Is it possible?

Thanks for any suggestions.
 
Add this into your where clause in the query:

Code:
(Mid(STR([GPS].[Time]),Len(STR([GPS].[Time]))-3,1)="0" or Mid(STR([GPS].[Time]),Len(STR([GPS].[Time]))-3,1)="5")

Probably a better way to do it, but it looks at the minutes digit of the short date format and sees if it is a 0 or 5 (for multiples of 5).

A prettier way to do it would be to figure out how to use the modulus operator (%) on a date field in access, then you could put:

where (TIME AS NUMBER)%5 = 0

But I didn't get that to work for me so I did it with strings instead.
 

Users who are viewing this thread

Back
Top Bottom