in Web & Tech

Drupal 7 and Views 3: Date granularity for Grouping

Say you try to group events by date and you have several events at the same day but at different times. I thought I’d just add another date field to my view, set it to d.m.Y and group by that. Didn’t work out, for every time of the day there will still appear a new group. The solution is simple: just strip all html tags for the date field you want to group by. This will remove any RDF attributes from the field, thus really having the same grouping values on a per-day-granularity. This will work for any other granularity as well, just add the desired date format and you’re good to go!

Write a Comment

Comment