Sorting a list on a full month name

Sorting a list on a full month name header image

Sorting a list on Month by using a calculated field. Ever wanted to sort your view of a list based on Months, still wanting to display January, February. The result of sorting on that column would actually giving you an A, B, C result rather then returning them in chronological order. Getting that done can be quite easily obtained by using calculated fields, since they allow you to ‘as the name says’ calculate values based on other values already stored on your columns, and that what we want, though before we start some basic understanding of the calculated fields might come in handy.

A calculated field is always a ‘new’ value based on existing ones, and can be of the type: string, number, value, date/time or yes/no. You can find some more information about all of the functions on (make sure you check that one out, since in this post I will only cover a few basics.

Let’s say we have a first name, last name and we want to concatenate a Full Name =[column1]&[column2] // column1, column2

Saying that instead of writing the full first name you could also ‘split’ it, and only use the first character

=LEFT([column1];1)&". "&[column2] // c. column2

Enough about the basics, you can add a calculated column and use the =TEXT([DateColum], "mm")to get the month value into a text field (01, 02, 03 instead of the Formatted dates). Next thing, just sort your view on that column, and hide it, and show your nicely formatted date (something like January, February) and as you will see its nicely sorted.

Loading comments…