Summarize dates for like records

  • Thread starter Thread starter Water guy
  • Start date Start date
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?
 
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
 
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
 
Back
Top