How to Set SharePoint Date Validation Within 30 Days of Today
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.

- 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.
Ensure you have Edit or Full Control permissions for the SharePoint list or library so you can access and modify the column settings.
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.
Navigate to your SharePoint list or library. Click the gear icon in the top right corner (Settings), then select 'List settings' or 'Library settings'.
Scroll down to the 'Columns' section and click on the name of the Date column you want to apply the validation to.
Scroll to the bottom of the column settings page and click to expand the 'Column Validation' section.
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.
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.

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.

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.




