In this SharePoint Online tutorial, we will discuss what is conditional formatting in SharePoint online list, how to apply conditional formatting based on the date in SharePoint online list, and also how to delete conditional formatting based on a date in SharePoint online list.
What is Conditional formatting in a SharePoint Online list?
Conditional formatting allows us to define rows, that will change the appearance of a SharePoint list column based on conditions where it making easy to highlight certain values.
Example: We have created a list for RENA Technologies, a company based out in the United States of America. Based on the business scenario, the client stored Semiconductor Issue Tracker list in SharePoint Online. We stored information like:
- Issue ID
- Issue
- Issue Description
- Issue Image
- Issue Status
- Issue Assigned to
- Issue Start Date
- Issue Resolved Date
We already have a Date and time type, columns as Issue Start Date and Issue Resolved Date, so we will create a Conditional format to Issue Start Date like when the Issue started before this year if yes then we can highlight or color code and displays the list items that are presented in the list. Also, we can give Issue Start Date as between today and a particular date by giving conditions. We will see how to give conditions in the next process.
SharePoint list conditional formatting based on a date
For creating a Conditional format based on date, we should have a Date and time type column in our SharePoint list.
There are two different ways to create Conditional formatting based on the date, they are:
- Create Conditional formatting based on the date using column settings.
- Create Conditional formatting based on the date using Format current view.
Create Conditional formatting based on a date using column settings
We will see how to create a conditional formatting based on the date using column settings in a SharePoint Online modern list.
- Open your SharePoint Online that you have created with the Date and time type column, else Navigate to https://<tenantname>.sharepoint.com/sites/<sitename> /Lists/<listname>. Example:https://tsinfotechnologies.sharepoint.com/sites/RenaTechnologies/Lists/SemiconductorIssueTracker
- Then, click on the column, of Date and time type -> Select Column settings. Example: Issue Start Date

- It Expands with a dialog box, click on the Format this column

- In Format columns, Choose Conditional Formatting and on the same Conditional formatting click on the Manage rules as shown below:

- A dialog box appears with Conditional formatting, we will explain with some examples for adding rules:-
- Case 1: click on the +Add rule

- Now we will create a rule by if condition, IF:
- Choose a column: we need to choose a column in which we create a rule. Example: We will choose Issue Start Date
- Choose a Comparison: we will use a comparison of whether the column is equal to, before, not equal to, etc. Example: We will choose is before
- Choose a type or value: We need to choose between, Today or A Specific date. Example We will choose A Specific date -> Select a date in calendar(Jan/01/2023)

- Show list item as:- We can set a color based on our requirement.
- Now we can see the applied condition based on a date, that the IssueStartDate column has color-coded based on the is before comparison with the 1/1/2023 date and displays the list item as highlighted as shown below:

- Case 2: Now we will add another rule, Click on the +Add rule, here we can add another rule. (Optional)

- Now we will create a rule by if condition:
- Choose a column: we need to choose a column in which we create a rule. Example: We will choose the Issue Start Date
- Choose a Comparison: we will use a comparison of whether the column is equal to, before, not equal to, etc. Example: We will choose is between
- Choose a type or value: We need to choose both between, Today and A Specific date. Example: We will choose Today and A specific date -> Select a date in calendar(April/27/2023)

- Show list item as:- We can set a color based on our requirement.
- Click on the Save Button.
- Now we can see the applied condition based on a date, that the IssueStartDate column has color-coded based on the is between comparison with the today date and 4/27/2023 date and displays the list item as highlighted as shown below:

In the below screenshot, we can find that, we have created two conditions with a comparison of is before and is between of Issue Start Date column

- We have applied both the conditions above that are based on a date. Here the IssueStartDate column has color-coded based on the comparison of is before and is between comparison displays the SharePoint Online list item as highlighted as shown below:

This is how to create conditional formatting based on the date using SharePoint Online list column settings.
Create SharePoint List Conditional formatting based on the date using Format current view
We will see how to create a SharePoint list conditional formatting based on the date using the Format current view
- Open your SharePoint Online that you have created with the Date and time type column, else Navigate to https://<tenantname>.sharepoint.com/sites/<sitename> /Lists/<listname>. Example:https://tsinfotechnologies.sharepoint.com/sites/RenaTechnologies/Lists/SemiconductorIssueTracker
- Now expand the All items drop down and click on the Format current view

- In Format view, Choose Conditional Formatting, and on the same Conditional formatting click on the Manage rules as shown below:

- A dialog box appears with Conditional formatting, click on the +Add rule

- Now we will create a rule by if condition, IF:
- Choose a column: we need to choose a column in which we create a rule. Example: We will choose Issue Start Date
- Choose a Comparison: we will use a comparison of whether the column is equal to, before, not equal to, etc. Example: We will choose is after
- Choose a type or value: We need to choose between, Today or A Specific date. Example We will choose A Specific date -> Select a date in calendar(Jan/01/2023)

- Show list item as:- We can set a color based on our requirement.
- Now we can see the applied condition based on a date, that the IssueStartDate column has color-coded based on the is before comparison with the 1/1/2023 date and displays the list item as highlighted as shown below:

This is how we can create Conditional formatting based on the date using the Format current view
How to delete the SharePoint list conditional formatting based on a date?
We already applied the conditional format based on the date in the above examples. We will see how to delete conditional formatting from the SharePoint Online list.
- Click on the column, to which you applied the conditional format of Date and time type, -> Select Column settings. Example: Issue Start Date
- It Expands with a dialog box, click on the Format this column
- In Format columns, Choose Conditional Formatting and on the same Conditional formatting click on the Manage rules.
- A dialog box appears with Conditional formatting, where we applied the condition -> click on the color based as shown below:

- Click on the No styles.

- Then, Click on the more options(…), as shown below:

- Click on the delete rule.

- Then, click on the Save button. Now we can see the applied condition is deleted based on a date, that the IssueStartDate column has color-coded based on the comparison as shown below:

This is how we can delete the conditional formatting based on a date in a SharePoint Online list.
Conclusion
In this SharePoint Online Tutorial, we discussed what is conditional formatting in SharePoint online list, how to create Conditional formatting based on the date in SharePoint online list, and also how to delete conditional formatting based on a date in SharePoint online list.
You may also like:
- SharePoint Online List Attachment Column
- Import SharePoint list from Excel
- Create Calendar Events from a SharePoint Online list
Bijay Kumar Sahoo is a highly accomplished professional with over 15 years of experience in the field of SharePoint and related technologies. He has been recognized as a Microsoft MVP (Most Valuable Professional) more than 9 times, starting from April 2014, for his exceptional contributions to the SharePoint community. Bijay is also a prolific author, having written two books on SharePoint – “Microsoft Power Platform – A Deep Dive” and “SharePoint Online Modern Experience Practical Guide“. His deep insights into SharePoint are also shared on his popular YouTube channel EnjoySharePoint where he teaches SharePoint to a global audience (From various countries like the United States of America, Canada, the United Kingdom, Australia, New Zealand, etc). Read more…