Grouping by hour

  • Thread starter Thread starter Abby
  • Start date Start date
A

Abby

I am attempting to set up a report that groups all records
in a specific hour together. The first record usually
starts on the half hour. It seems that it is not grouping
all records that are in the same hour. I have a header of
8 AM and I have records anytime from 8:30-9:30. I did one
other report that seemed to work - I grouped on "minute"
and used an interval of 60, but then often times even
though the times are 10:00 - 11:00 the header still says 9
AM. So, I'll have 2 - 9 AMs. I do know some code, but
not much.
 
Abby said:
I am attempting to set up a report that groups all records
in a specific hour together. The first record usually
starts on the half hour. It seems that it is not grouping
all records that are in the same hour. I have a header of
8 AM and I have records anytime from 8:30-9:30. I did one
other report that seemed to work - I grouped on "minute"
and used an interval of 60, but then often times even
though the times are 10:00 - 11:00 the header still says 9
AM. So, I'll have 2 - 9 AMs.


Try setting the group's Field/Expression to:

=DatePart("h", datetimefield)

Be sure to set Group ON to Each Value and Group Interval to
1.
 
Back
Top