sitelogo
  Skip Navigation Links
Log in to create posts To create new posts or to reply to existing ones, you must be registered and logged in!
  
View: 
Post
Started: 7/18/2008 2:41 PM
Picture Placeholder: jontycollins
jontycollins
Viewing a list by month and year
I have the requirement to group a list by month (and even by year). We brought this up at the last forum meeting and a number of options were put forward.
 
I found these two solutions at the following blog: http://kalsing.blogspot.com/2006/02/sharepoint-list-group-by-month.html
 

SharePoint list: Group by month

If you have a SharePoint list that contains a date column, you may want to create a view that groups all the items by month. For example, in a standard task list you can create a view that groups the tasks by which month the DateField is in.

To accomplish this, create a calculated field that returns a single line of text and has the following formula:

=YEAR([DateField])&"-"&CHOOSE(MONTH(DATEVALUE("1/"&MONTH([DateField])&"/"&YEAR([DateField]))),"01. January","02. February","03. March","04. April","05. May","06. June","07. July","08. August","09. September","10. October","11. November","12. December")


Then select this field under Group By when customising your view. It can also be used for filtering and a similar calculated field can be used to group by week or by year.

=TEXT([DateField],"yyyy - ")&TEXT([DateField],"mm")&TEXT([DateField]", (mmmm")&TEXT([DateField]," yyyy)")

Posted: 8/7/2008 3:18 PM
Picture Placeholder: michael.odonovan
michael.odonovan
Hi Jonty,
 
Did you come right with this? Did this sample help?
 
Michael
Posted: 8/12/2008 1:40 PM
Picture Placeholder: michael.odonovan
michael.odonovan
I did a quick demo and it seemed to work pretty well. I used the following formula though to pull through month
 
=TEXT([Campaign Start Date],"yyyy - ")&TEXT([Campaign Start Date],"mm")&TEXT([Campaign Start Date]," (mmmm")&")"
Of course you could do the same to pull through just year. Then create a view which is by year and then by month. Happy days! :-)