Skip to main content

Restrict a Date to the Past or the Future (Formula)

This column validation uses a SharePoint formula to keep a date on the right side of today, so a renewal cannot be booked in the past and a birthdate cannot be set in the future. Because it lives in validation, SharePoint enforces it for every item automatically - no custom development and nothing for your users to remember.
Built with
Features
Column Validation, Date and Time Column
Category
Formulas

Want one like this?

Talk to Greg
  • What it does: Only lets the item save if the Renewal Date is in the future.
  • If it passes: The date is after today, so the item saves normally.
  • If it fails: SharePoint blocks the save and shows the message you set, for example: The renewal date must be in the future.
  • Renewal or expiry dates must be ahead
  • Scheduling future events
  • Preventing back-dated deadlines
  • Forward-looking planning fields
  • Formula Type: Column Validation
  • Formula Category: Dates & Time
Display nameColumn type
Renewal DateDate and Time
  1. Create the column the formula reads: Renewal Date
  2. Add or edit a few items so there is data for the formula to work with
  1. Open the column you want to validate (Edit column, then More options)
  2. Expand Column validation
  3. Paste the formula below into the Formula box
  4. Add a user message that explains the rule, so people know why an entry was blocked
  5. Save. From now on, new or edited entries must pass the rule
=[Renewal Date]>TODAY()
  • Future dates only: =[Renewal Date]>TODAY()
  • Past dates only: =[Birthdate]
  • Today or later: =[Due Date]>=TODAY()
  • Inside a window: =AND([Date]>=TODAY(),[Date]<=TODAY()+90)
What does this formula do?

Date must be after today. It runs as column validation, so it checks the value when the item is saved and blocks entries that do not pass.

Which columns do I need to set this up?

You need: Renewal Date (Date). The formula reads these to produce its result.

Will it check items that are already in the list?

No. Validation applies only to new or edited entries. Existing items are not re-checked when you add the rule.

If LookBook 365 is code-free and out-of-the-box, why does this example use a formula?

A SharePoint formula is native, declarative configuration, not custom development. It only works with the item's own fields and simple logic - it cannot run scripts, reach external services, or change other data, and nothing is deployed to your tenant. It keeps working through Microsoft updates. If you would rather not set this up yourself, this is exactly the kind of thing I configure for clients.

How do I stop someone entering a birthdate in the future?

Use =[Birthdate] on the birthdate column. It is the same rule as the future-only version with the operator flipped.

Does TODAY() keep the rule accurate over time?

It is evaluated when an item is saved, so new and edited items are always checked against the current date. Items already in the list are never re-checked, so a date that was valid last year stays put.

Allow Future Dates Only Formula Example
Allow Future Dates Only Formula Example