logo
search
SharePoint Document Issues

How to Set SharePoint Date Validation Within 30 Days of Today

Adam DavisAdam Davis Oct 12, 2026 869 views

Question details

The user needs to set up a rule in SharePoint Online that restricts the date entered in a specific column to be within 30 days of the current date.

How to Set SharePoint Date Validation Within 30 Days of Today
Product
SharePoint Online
Device & OS
not provided
Scenario
Configuring list or library settings to ensure accurate data entry by enforcing a 30-day dynamic window relative to the current date.
Observed behavior
Users need the exact formula syntax and the step-by-step configuration path to successfully apply this validation to their date columns.
Before you start

Ensure you have Edit or Full Control permissions for the SharePoint list or library so you can access and modify the column settings.

Solution 1Recommended

Configure Column Validation with the TODAY() Formula

Use SharePoint's built-in column validation settings to apply a dynamic formula that checks if the entered date is within a 30-day window from today.

SharePoint allows you to validate data at the column level. By using the TODAY() function in combination with an AND logic statement, you can restrict users from entering dates that fall too far in the past or future.

1
Access List or Library Settings

Navigate to your SharePoint list or library. Click the gear icon in the top right corner (Settings), then select 'List settings' or 'Library settings'.

2
Select the Date Column

Scroll down to the 'Columns' section and click on the name of the Date column you want to apply the validation to.

3
Open Column Validation

Scroll to the bottom of the column settings page and click to expand the 'Column Validation' section.

4
Enter the Validation Formula

In the 'Formula' box, enter exactly: =AND([YourColumnName]>=TODAY()-30,[YourColumnName]<=TODAY()+30). Be sure to replace 'YourColumnName' with the actual internal name of your column.

5
Add a User Message

In the 'User message' box below the formula, type an instructional message such as 'Please enter a date that is within 30 days of today.' Click 'OK' to save your changes.

Configure Column Validation with the TODAY() Formula
Check the Internal Column Name: Formulas require the internal column name, not the display name. If your formula fails, check the column's URL on the edit page (look for 'Field=' at the end of the URL) to find the exact internal name.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

While managing complex lists and site configurations requires the SharePoint ecosystem, processing the actual documents stored inside them doesn't have to be expensive or heavy. WPS Office offers a fast, completely free alternative to heavy desktop office suites.

Highly compatible with standard Microsoft Office formats (.docx, .xlsx, .pptx) downloaded from SharePoint.Lightweight application that runs smoothly on almost any device without draining system resources.Completely free to use with an intuitive, familiar tabbed interface for seamless migration.All-in-one suite that includes Word, Excel, PowerPoint alternatives, and robust PDF editing tools.
microsoft office alternative - wps office

Frequently Asked Questions

Can I restrict dates to only the future within 30 days?

Yes. If you want to ensure the date is strictly within the next 30 days and not in the past, adjust the formula to: =AND([ColumnName]>=TODAY(), [ColumnName]<=TODAY()+30).

Why is my SharePoint validation formula returning a syntax error?

Syntax errors usually occur because of an incorrect column name or incorrect regional syntax. Ensure you are using the column's internal name. Also, depending on your region, you might need to use semicolons (;) instead of commas (,) to separate the arguments in the AND statement.

Will the TODAY() formula update old items automatically?

No. SharePoint column validation is only evaluated when an item is created or updated. If an item was created 10 days ago, it will not suddenly throw an error when it reaches 31 days unless someone attempts to edit and save that specific item again.