If this is in a datetime variable type, how about you offset your original time by 1 hr (e.g., yourVarName - hours(1)). After that you can group them by date and perform average over each group (consider using findgroups function). This can be done easily using splitapply function if this is a table variable.
Best Answer