How to write validation rule for a field DOB__c must be less than a specific date(1/jan/1990)? Means year of 1989,1988...are allowed but the year 1991 are not allowed


Please use the below validation rule.

DOB__c >= DATE(1990,1,1)

Date is standard date constructor function available while building validation rule.

  • YEAR(DOB__c) >= 1990 would also work. – sfdcfox Apr 15 '18 at 11:22

OR(ISBLANK(DOB__C),DOB__c >= DATE(1990,1,1)) By the above rule my problem is resolved

  • 2
    If the answer by Shankish addressed your problem, please consider accepting it by clicking on the check mark/tick to the left of the answer, turning it green. This marks the question as resolved to your satisfaction, and awards reputation both to you and the person who answered. If you have >= 15 reputation points, you may also upvote the answer if you wish. There is no obligation to do either. – Adrian Larson Apr 17 '18 at 17:15
  • 3
    While there's nothing wrong with accepting your own answer, it is meant to indicate who helped you most, and it certainly seems like Sankish set you on the right path. Your post here is only a minor adjustment to what he recommended, and your Original Post (OP) wasn't really clear enough to know how blank values should be handled. – Adrian Larson Apr 17 '18 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.