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
Kapil JaiswalKapil Jaiswal 

validation on datetime field

I am new to force app development. I have a datetime field called schdule.
i have put formula Schedule__c  >  now() + XXX (any number)
the syntax check shows ok. what i a trying to achieve is the that this datetime field should contain anything from tomorrow onwards.
Please suggest. Currently, even this validation Schedule__c  >  now()  is not working
Best Answer chosen by Kapil Jaiswal
AnjithKumarAnjithKumar
Hello Kapil,

You error formula condition as follows 
DATEVALUE(Schedule__c) <= TODAY()

so that it will restrict date earlier than today. It will allow only future date only not past date.

Thanks,
Anjith kumar


 

All Answers

AnjithKumarAnjithKumar
Hello Kapil,

You error formula condition as follows 
DATEVALUE(Schedule__c) <= TODAY()

so that it will restrict date earlier than today. It will allow only future date only not past date.

Thanks,
Anjith kumar


 
This was selected as the best answer
Kapil JaiswalKapil Jaiswal
thanks Anjith. I misunderstood the validation. now it is working.