Date Validation in SharePoint

Date Validation in SharePoint
4 votes, 4.75 avg. rating (94% score)

Introduction

In this post we will see how to implement SharePoint validations taking example of a scenario. I have observed many users got struck implementing some basic validations. Hope my series of SharePoint validation articles helps everyone to resolve their issues right from basics to advanced.
If you are new to implement validations in SharePoint, please do check this article to understand how we can implement validations http://adicodes.com/column-validations-and-list-validations-in-sharepoint-2010/.

Scenario – StartDate Should be greater than DueDate

I am using following List Columns and their type in the example
StartDate – Date and Time
DueDate – Date and Time

Formula

=DueDate>StartDate



Formula and validation message setting

Formula will be inserted from list settings > validation settings option. This is list level validation as formula involves with two different columns

Validation Message

Conclusion

We will further cover some good scenario’s and hope you will enjoy implementing them wherever required. If you are looking for any specific scenario formula, please post a comment and I will try to provide the formula or I will certainly help you to get it resolved :)

November 7, 2013 В· Adi В· 4 Comments
Tags: , , ,  В· Posted in: Sharepoint 2010, SharePoint 2013, Validations

4 Responses

  1. Shanib Bhat - February 4, 2014

    Hello and thanks for the post

    I have done the same but instead of Due date i have End date.

    But after validation i cant leave the field blank. I want End date to be blank so that i can enter the value after task is over.

    Will be happy if i get some help from you.
    Thanks

  2. Adi - February 5, 2014

    Hello Bhat,

    In your case you have to check if the field is blank before the validation rule fires. If Empty return true or if value is there then check with validation formula. Following will fit to your case
    =IF(ISBLANK(EndDate),TRUE,IF(EndDate>StartDate,TRUE,FALSE))

    Happy coding.

    Regards,
    Adi

  3. Kevin - April 22, 2015

    =DueDate>StartDate

    I used the same string above replacing DueDate with EndDate and SharePoint 2013 returns and error code of this message:

    “The formula cannot refer to another column. Check the formula for spelling mistakes or update the formula to reference only this column.”

  4. Stacey - August 6, 2016

    I want people to only be able to schedule in 15 minute increments.

    Trying to validate the minutes in the End Time column.

    =INT(([End Time]-[Start Time])*1440)<=15

    Help!

Leave a Reply

What is 5 + 3 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)