Extracting Data based on time

M

MAY

I have a data logger that collects data every 5 seconds from 2 sources. I
have imported the data into 2 separate tables. How can I extract data every 5
minutes at the hh:mm:00 time value (i.e. at 0 seconds) - so that I can
perform calculations on the extracted data for the same time periods.
 
K

KARL DEWEY

In Excel use autofill to create a list of time from 12:00:00 AM to 12:55:00
PM. Import into table named All_Time with field named the same.
In query use TimePart function on the source datetime data and
All_Time.All_Time as criteria.
 
J

John W. Vinson

I have a data logger that collects data every 5 seconds from 2 sources. I
have imported the data into 2 separate tables. How can I extract data every 5
minutes at the hh:mm:00 time value (i.e. at 0 seconds) - so that I can
perform calculations on the extracted data for the same time periods.

You can use the fact that a Date/Time field is stored as a Double Float count
of days and fractions of a day (times). Since there are 24x12=288 five-minute
intervals in a day, you can use a calculated field:

TimeBlock: cdate(fix(cdbl([timefield])*288)/288)

You can use TimeBlock as the the group-by field in a totals query.
 
M

MAY

Thanks for your reply

I followed your suggestion and created a table with times at 5 minute
intervlas.

However at the query - I came up with an "undefined function Timepart in
expression". Using Time value function and the criteria as suggested - the
recordset returned did not have all the 5 minute time increments
Any suggestions as to what I should do differently
 

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

Top