I want to group my content type to group by years in views, for example Archive 2014-2015
or Archive 2014-16
. How can I get this groupings?
Archive 2013-2014
-COntent 1
-Content 2
-Content 3
Archive 2015-2016
-COntent 1
-Content 2
-Content 3
The key challenge you'll face here is that neither Views nor Date modules provide aggregation options for date-based fields.
This can be solved by using the Views Date Format SQL module. It adds a nice little check-box that allows you to group dates by a custom formatted string, as shown in this example also:
In the above example, the custom date format is set to "M Y" (which translates to Oct 2015 for example), and the box for "Use SQL to format Date" was checked. This is the only configuration needed.