function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VRK SFDCVRK SFDC 

Validation rule on picklist field and Datetime field

Hi ,
I am trying to create a validation rule where the Stage is Tommorow and if the Date is not equal to tommorw then Error should display as "select tommorws date ".Can any one help

ISPICKVAL( Stage__c, "Schedule given for tomorrow")   && (Date_and_Time__c   !=  NOW()+1)
VIGNESH BALASUBRAMANIANVIGNESH BALASUBRAMANIAN
Hi,

Try this......


ISPICKVAL( Stage__c, "Tommorrow")   && (Date_and_Time__c   !=  Today()+1)


Thanks & Regards,
Vignesh.B
hybin joseph 2hybin joseph 2
Hi Can u try this and let me know if it worked :
 
ISPICKVAL(Stage__c, "Schedule given for tomorrow") && (DATEVALUE (Date_and_Time__c) <> TODAY()+1)

I have assumed ur field is a Date and time Field and not just a date field