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
kirankumarreddy punurukirankumarreddy punuru 

Simple validation rule not working

Hi ,
I am using a validation rule which displays an error when billing start date greater than or equal to billling end date .
My validation rule is :AND(Billing_start_date__c >= Billing_end_Date__c)
But this validation rule is displaying error even when the billing start date less than end date.
The validation rule is working fine in the case of edit but when we are insering a new record then it is showing an error.
I am sharing the screenshot can some one help me on this.User-added image
Regards,
Kiran 
Ashish DevAshish Dev
AND is not required.
kirankumarreddy punurukirankumarreddy punuru
Hi Ashish
I have removed that AND condition and used billing_start_date__c >= billing_end_date__c still it is not working 
Ashish DevAshish Dev
You need to check if there are other validation / workflow rules affective these dates? Also checkout and triggers modifying value?
AshlekhAshlekh
Hi,

Here is link provide by salesfore on Date field validation.

https://developer.salesforce.com/docs/atlas.en-us.usefulValidationRules.meta/usefulValidationRules/fields_useful_validation_formulas_date.htm
"End Date Cannot Be Before Begin Date"

Or you can chang the formula by this 
(Billing_end_Date__c - Billing_start_date__c) <=0

-Thanks
Ashlekh Gera