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
Peyman HeydariPeyman Heydari 

Validation rule for number of days between 2 dates

Hi,
I am trying to create a validation rule for the following scenario:
The end date - start date must equal to 30
Here is how I created it:

DAY(Bill_End_Date__c) - DAY(Bill_Start_Date__c) = 30
but it's not working. Any tips on how to make this work?
Thanks so much 
Best Answer chosen by Peyman Heydari
VinayVinay (Salesforce Developers) 
Above validation rule will trigger when difference between end date and start date is equal to 30.  For eg enter 30/10/2022(Bill_End_Date__c ) and 29/11/2022(Bill_Start_Date__c).

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
Hi Peyman,

Can you try below.
(Bill_End_Date__c - Bill_Start_Date__c) = 30

Please mark as Best Answer if above information was helpful.

Thanks,
Peyman HeydariPeyman Heydari
Sorry Vinay but this does not work either. This was my 1st guess actually but for some reason it does not work. 
VinayVinay (Salesforce Developers) 
Above validation rule will trigger when difference between end date and start date is equal to 30.  For eg enter 30/10/2022(Bill_End_Date__c ) and 29/11/2022(Bill_Start_Date__c).

Thanks,
This was selected as the best answer
ben simsben sims
First things first: start by reading through your research material and getting familiar with what you're writing about. Read through the text again, taking notes as you go, so that when you write something down later on it'll be easy for you to remember what it was that made sense to note at the time. Then take breaks if needed Best Essay Writing Service UK (https://dissertationguru.co.uk/essay-help.php)—anywhere from 10 minutes to an hour or more—to give yourself time to process everything before diving back into the material again.