How to add days to date in SharePoint calculated column? [5 examples]

In this SharePoint Online tutorial, I will explain the SharePoint calculated column to add days to date. Then, I will show you how to use a SharePoint calculated column to add months to date. Also, we will discuss the SharePoint calculated column to add years to date. Lastly, I will show you how to use the SharePoint calculated column to add hours to date.

SharePoint calculated column add days to date

Here, I will show you, how to use the SharePoint calculated column to add days to date. To achieve it, follow the below two scenarios.

Scenario 1SharePoint calculated column add days to date using now() function

Suppose I have a SharePoint list; inside this, I have added a calculated column like Delivery Date. When we add a product, the delivery date will be automatically created.

Add a SharePoint Online calculated column add days to date

Now, I will show you how to create date columns without a date field. Follow the below steps.

  • Open the SharePoint Online list, click the + Add column, and select See all column types. Then, click on the Next button, as shown below.
SharePoint Online calculated column add days to date
  • Then, you can enter the name of the column (Delivery Date), and select the data type (Calculated). Next, add the function under the Formula box, select Date and Time, and select Format as Date Only. Also, click on the Ok button.
=now()+5
Add a SharePoint calculated column add days to date

Note:

If you created a calculated column with [TODAY] or [Me] functions, you will be get the following error like “Sorry, Something Went Wrong…”
Calculated column add days to date from SharePoint
  • Once, the calculated column is added, now enter the product name. Then, the delivery date will be automatically created like below.
Create a SharePoint calculated column add days to date

Scenario 2SharePoint calculated column add days to date using another date column

When a user wants to select an order date using the date field, the delivery date will be added under the calculated column.

Calculated column add days to date in SharePoint Online

Follow the instructions below to create a calculated column based on the date field. Such as:

  • Open the SharePoint list, click on the + Add column, and select Date and Time. Then select the Next button like below.
Add a SharePoint calculated column to add days to date
  • Next, on the Create a column window, enter the column name (Order Date). Then, click on the Save button.
Add a SharePoint Online calculated column to add days to date
  • Once the date column is added, click on the + Add column. Next, select the See all column types, and click the Next button.
Add a calculated column  add days to date from SharePoint
  • Then, on the Create Column window, enter the name of the column (Delivery Date), and select the data type (Calculated).
  • Next, add the function under the Formula box, select Date and Time, and select Format as Date Only. Also, click on the Ok button.
=[Order Date]+7
Add a calculated column  add days to date from SharePoint Online
  • Once click on OK, the calculated column is added. Now, add an order date to get the delivery date under the calculated column below.
SharePoint calculated column add days to date using another date column

This is how to use a SharePoint calculated column to add days to date.

SharePoint calculated column add months to date

Let us see here how to use a SharePoint calculated column to add months to date based on my SharePoint list.

SharePoint calculated column add months to date

To do so, follow the below steps. Such as:

  • Open the SharePoint Online list, click on the + Add column, and select Number. Then, click on the Next button.
SharePoint Online calculated column add months to date
  • Next, enter the column’s name (No Of Dates For Exchange), and click on the Save button.
SharePoint Online calculated column to add months to date
  • Once, the number column is added then add a calculated column for adding months to date. Then, click on the +Add column -> choose See all column types -> Then click on the Next button.
  • In Create column page, provide the column name (Exchange Offer Ended) and choose the type as Calculated. And, add the function under the Formula box.
  • Then, select Date and Time, and select Format as Date Only. Also, click on the Ok button.
=DATE(YEAR([Order Date]),MONTH([Order Date])+[No Of Months For Exchange],DAY([Order Date]))
Create a SharePoint calculated column add months to date
  • Once, the calculated column is added then add a number of months under the number column. Now, we will get when the exchange offer is ended as a date format.
Create a SharePoint Online calculated column add months to date

This is how to use a SharePoint Online calculated column to add months to date.

SharePoint calculated column add years to date

Let us see here, how to use a SharePoint calculated column to add years to date based on my SharePoint list.

SharePoint calculated column add years to date

To achieve it, follow the below steps. Such as:

  • Open the SharePoint Online list, click on the + Add column, and select Number. Then, click on the Next button.
SharePoint Online calculated column add years to date
  • Once, the number column is added then add a calculated column for adding years to date. Then, click on the +Add column -> choose See all column types -> Then click on the Next button.
  • In Create column page, provide the column name (Warranty Ended Date) and choose the type as Calculated. And, add the function under the Formula box.
  • Then, select Date and Time, and select Format as Date Only. Also, click on the Ok button.
=DATE(YEAR([Order Date])+[Warranty Years],MONTH([Order Date]),DAY([Order Date]))
SharePoint calculated column to add years to date
  • Once, the calculated column is added then add a number of years under the number column. Now, we will get when the warranty date is ended as a date format.
SharePoint Online calculated column to add years to date

This is how to use a SharePoint Online calculated column to add years to date.

SharePoint calculated column add hours to date

Similarly, Here, I will show you, how to use a SharePoint calculated column to add hours to date. To achieve it, follow the below two scenarios. Such as:

Scenario 1 – SharePoint calculated column add hours to date using now() function

Suppose, I have a SharePoint Online list as “Food Delivery Details” and inside this, I have added a calculated column named “Add Delivery Date With Hours”. Here, when the user enters the food name, the delivery date will be added under the calculated column.

SharePoint Online calculated column add hours to date

Now, follow the below steps to create a SharePoint calculated column to add hours to date.

  • Open the SharePoint Online list, click on the + Add column, and select See all column types. Then, enter the column’s name (Add Hours to Delivery Date) and select the data type (Calculated). And add the function under the Formula box.
  • Then, select Date and Time and click on the Date & Time format. Also, click on the Ok button.
=now()+(4/24)

Where,

  1. =now() = Today date
  2. (4/24) = We can add 4 hours by using the entire day’s hours.
SharePoint calculated column to add hours to date
  • Once, the calculated column is added, enter the food item. Then, we will get a delivery date with the hours.
SharePoint Online calculated column to add hours to date

Scenario 2 – SharePoint calculated column add hours to date using another column

When a user wants to select an order date with time by using the date field, the delivery date will be added along with hours under the calculated column.

Create a SharePoint calculated column add hours to date

To achieve it, follow the below steps. Such as:

  • Open the SharePoint Online list, click the + Add column, and select Date and time. Then, enable the Include Time slide. And select the Save button like below.
Create a SharePoint Online calculated column add hours to date
  • Once, the date column is added, then add the calculated column. Now, click on the + Add column, and select See all column types option.
  • Then, enter the column’s name as (Add Hours to Delivery Date) and select the data type (Calculated). And, add the function under the Formula box.
  • Also, select Date and Time and click on the Date & Time format. Also, click on the Ok button.
=[Order Date]+(3/24)
SharePoint calculated column add hours to date
  • Now, select the order date and add the time, then we will get the delivery date along with the hours as shown below.
Create a SharePoint Online calculated column to add hours to date

This is how to use a SharePoint calculated column to add hours to date.

Conclusion

I have explained the SharePoint calculated column to add days to date here. Then, we learned the SharePoint calculated column to add months to date. Then, we covered the SharePoint calculated column to add years to date. In the last, I have explained the SharePoint calculated column to hours to date.

You may also like: