Summarize dates for like records

W

Water guy

I have a very large data set with events happening in time steps that are
broken down into five minute increments. Over the course of two years the
events occur on less than 200 days. I am seeking to query the table for the
dates when the events occur. When doing so the query returns with the dates,
but the dates are broken down into 5-minute increments. I would like
summarize the dates so that no time of day component is included and I can
obtain the dates of the roughly 200 days that the events occur instead of the
10,000 records that contain an event.
Any suggestions?
 
J

Jeff Boyce

Check Access HELP on the use of the Date-related functions. How you would
do what you describe depends on whether you are storing a true Date/Time
value or a text string.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

Ken Sheridan

Try something like this to return all events in event/date order:

SELECT DISTINCT [Event],
DateValue([YourDateTimeColumn]) As EventDate
FROM [YourTable]
ORDER BY [Event], DateValue([YourDateTimeColumn]);

If you wish to return a specific event you could include a parameter on the
Event column such as [Enter event:] so that you'd be prompted for the event
at runtime.

If the query is being used as the RecordSource for a report omit the ORDER
BY clause and use the report's internal sorting and grouping mechanism to
order it.

Ken Sheridan
Stafford, England
 

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