date and time querie

  • Thread starter Thread starter john.9.williams
  • Start date Start date
J

john.9.williams

hi,

i have a table with data, one of the columns hase the date and time
entered into it, what i am trying to do is run a qurie that tells me
how many rows of data are within a minute of the previous row of
data.
i am stuck it will problay need a macro hep!
 
hi,

i have a table with data, one of the columns hase the date and time
entered into it, what i am trying to do is run a qurie that tells me
how many rows of data are within a minute of the previous row of
data.
i am stuck it will problay need a macro hep!

A Macro isn't appropriate for this; a Query is.

To find records where consecutive date/time values are within a minute of one
another, use a Self Join query. Create a new query based on your table; use
the "Add Table" icon to add the same table again, so that it's displayed in
the query window twice (Access will probably assign an alias to the second
instance by appending _1 to the tablename).

Add whatever fields you want to see, and as a critirion on
table_1.datetimefield put
.[datetimefield] AND <= DateAdd("n", 1,
.[datetimefield])


using your own table and fieldnames of course. This will find all records in
the second instance of the table where the time is after, but no more than one
minute after, the value in the first instance.
 
Back
Top