|
|
|
|
|
|
|
|
|
|
 To create new posts or to reply to existing ones, you must be registered and logged in! |
Started: 7/18/2008 2:41 PM | |
|  | 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.
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)")  |  |
|  | Hi Jonty,
Did you come right with this? Did this sample help?
Michael  |  |
Posted: 8/12/2008 1:40 PM | |
|  | 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! :-)  |  |
|
| Edit in Browser | /_layouts/images/icxddoc.gif | /forums/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /forums/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /forums/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /forums/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /forums/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /forums/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /forums/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /forums/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /forums/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
|
|
|