Knowledge Base

How to get year, month and week in Calculated Boost Field in a SharePoint list?

BoostSolutions’ Calculate Boost Field provides Year(), Month(), Week() and Day() functions, which enables you to calculate year, month, week and day from the specified field.

In this article, we will demonstrate how to use above functions in Calculated Boost Field in a SharePoint list.

WHAT YOU'LL GET

Year, Month and Week all calculated boost field, which shows the year of Purchased Date, the month of Purchased Dateand the weekday of Purchased Date.

WHAT YOU'LL NEED

The sample data we use for this case

There is a SharePoint list named as All Purchase Orders with following columns and items on a SharePoint site.

Get year from specified field in Calculated Boost Field

  1. Download the trial version of Calculated Boost and install it to your SharePoint server.

  2. Navigate to the All Purchase Orders list, click List tab. In the Manage Views group, click Create Column.

  3. In the Name and Type section, enter a name in the Column Name field to give it a meaningful name such as Year, then select Calculated Boost as the type of information in this column.

  4. In the Additional Column Settings section, type this expression in the Formula box.

    ToText(Year([Purchased Date]))

    This expression will catch the year from the Purchased Date column and turn it to text type.

    Specify the data type from this formula as Single line of text.

  5. Keep other settings as default and click OK to create column.

  6. Navigate to All Purchase Orders list and you will find that a column named as Year is created in the list and it shows the year of Purchased Date as following.

Get month from specified field in Calculated Boost Field

  1. Navigate to the All Purchase Orders list, click List tab. In the Manage Views group, click Create Column.

  2. In the Name and Type section, enter a name in the Column Name field to give it a meaningful name such as Month, then select Calculated Boost as the type of information in this column.

  3. In the Additional Column Settings section, type this expression in the Formula box.

    ToText(Month([Purchased Date]))

    This expression will catch the month from the Purchased Date column and turn it to text type.

    Specify the data type from this formula as Single line of text.

  4. Keep other settings as default and click OK to create column.

  5. Navigate to All Purchase Orders list and you will find that a column named as Month is created in the list and it shows the month of Purchased Date as following.

Get week from specified field in Calculated Boost Field

  1. Navigate to the All Purchase Orders list, click List tab. In the Manage Views group, click Create Column.

  2. In the Name and Type section, enter a name in the Column Name field to give it a meaningful name such as Week, then select Calculated Boost as the type of information in this column.

  3. In the Additional Column Settings section, type this expression in the Formula box.

    ToText(Weekday([Purchased Date]))

    This expression will catch the day of week from the Purchased Date column and turn it to text type.

    0 represents Sunday; 1 represents Monday; 2 represents Tuesday; 3 represents Wednesday; 4 represents Thursday; 5 represents Friday and 6 represents Saturday.

    Specify the data type from this formula as Single line of text.

  4. Keep other settings as default and click OK to create column.

  5. Navigate to All Purchase Orders list and you will find that a column named as Week is created in the list and it shows the weekday of Purchased Date as following.

Login