• Harsha sharma 14
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
 I need to create a validation rule where a custom field end date /time is greater than 6pm then it should throw error
 End date field is custom and calculated upon saving of two field (start date/time + span hours)

Below is the rule created but not working as expected
AND(
    ISNEW(),
    ISPICKVAL(OCE__SpanType__c, "Hours"),
    IF(
        OCE__EndDate__c > DATETIMEVALUE(TODAY()+(21/24)),
        TRUE, FALSE
    )
)