Question

I have created a column named Departure Schedule and its type is `Date and Time.

However, I need to check that the Departure Schedule should not be less than 10 days from Today().

Is it possible to code under SharePoint's Column Validation to check if the Departure Schedule entry is not less than 10 days from Today(), and if it is, a message will be shown "Departure Schedule should be more than 10 days from the date of request"?

I have tried entering this code (from this topic) under Column Validation

=[Departure Schedule] < DATE(YEAR(Today()),MONTH(Today()),DAY(Today())+10)

There were no Syntax error, but also there were no messages shown even if I entered a date that is less than 10 days from Today().

enter image description here

Example:

enter image description here

Date today is 9/25/2020 - No validation messages shown after entry


I'm new to SharePoint's Column Validation - any help would be highly appreciated.

Was it helpful?

Solution

Try using below formulas and check which one works best for your requirements:

=IF([Departure Schedule] < DATE(YEAR(Today()),MONTH(Today()),DAY(Today())+10), FALSE, TRUE)

OR

=IF([Departure Schedule] < (Today()+10), FALSE, TRUE)

OR

=[Departure Schedule] >= (Today()+10)

OTHER TIPS

As you are not considering things like working days and weekends, the simplest formula =([Departure Schdule]>=(TODAY()+10)) shall be enough for your list.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top