1

I have two date columns in a SharePoint List. I am trying to figure out the proper syntax for use in the Validation box.

For the first, I want to restrict the date entered to only accept today's date or prior dates.

For the second, I would like to restrict the date entered to today's date and future dates.

Any syntax examples would be greatly appreciated.

0

1 Answer 1

0

For the first date column, you can use column validation like:

=[Date Column]<=Today()

For the second date column, you can use column validation like:

=[Date Column]>=Today()

Example:

enter image description here

Note:

  1. Sometimes comma(,) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].
2
  • I enter "=[Last Updated Date] <= Today()" without the quotes save, go back in and look and it has been changed to =#NAME?&lt;TODAY() and does not work. It seems like it does not recognize the column name. Any thoughts Commented Jul 12, 2024 at 19:22
  • Use correct "display name" of column. You can try adding column validation from classic experience column settings page as well. From List settings --> Columns section --> click on your column name, change the settings and save changes. Commented Jul 13, 2024 at 4:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.