Display report grouping between times (1 Viewer)

Ray Spackman

Registered User.
Local time
Today, 08:10
Joined
Feb 28, 2008
Messages
52
I have a very small basic table containing these fields; Id, Date, Time, Name, and Amount. I also have a query with the same fields (although I don't know that the query is neccessary). I need a report that will display the records grouped by Date (which i can do) but also between hours on that date. Example:

[Date]
11:00 am to 11:59 am
(record whose [time] falls between the above times)
12:00 pm to 12:59 pm
(record whose [time] falls between the above times)
1:00 pm to 1:59 pm
(record whose [time] falls between the above times)

and so on. Just cannot seem to get it grouped correctly to achieve this.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:10
Joined
Aug 30, 2003
Messages
36,140
You should be able to add a field to the query that returns the hour:

Hour(TimeField)

and group on that field secondarily. Hopefully your fields aren't actually named "Date", "Time" and "Name", as all are reserved words and almost sure you cause you a problem at some point:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;209187
 

Ray Spackman

Registered User.
Local time
Today, 08:10
Joined
Feb 28, 2008
Messages
52
Thank You. That took care of most of it. Had to use the DatePart function for the sorting and grouping, then it worked perfectly.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:10
Joined
Aug 30, 2003
Messages
36,140
Excellent; glad you got it working.
 

Users who are viewing this thread

Top Bottom