date 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
 
PERHAPS something like the following will give you what you want.

SELECT A.DateField, Count(B.DateField) as CountPrior
FROM YourTable as A INNER JOIN YourTable as B
ON A.DateField > B.DateField and
A.DateField < DateAdd("s",60,B.DateField)
Group By A.DateField

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top