Group a SharePoint list by year or month

I was recently working on a project where we wanted to display a SharePoint list or calendar by grouping items by month. This is not a SharePoint default but can easily be accomplished by creating a new field.

Simply create a new field that is is a “Calculated column (calculation based on other columns)” and use the formulas below. Note that the formulas are creating the field based on the “Start Time” value. This can be customized as needed.

Month Formula (Year/Month, example “2015/08”)
=IF( [Start Time]="", "No start time", YEAR([Start Time])&"/"&RIGHT("0"&MONTH([Start Time]),2))

Year Formula (Year, example “2015”)
=IF( [Start Time]="", "No start tiime", ""&YEAR([Start Time]) )

Source: http://techtrainingnotes.blogspot.com/2012/02/sharepoint-group-by-year-or-month-in.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s