You need to sign in to do that
Don't have an account?

Validation rule to check if date is not less than current month
Hello,
I have a CustomObject1__c
I want to put a condition where
Date can not be less than current month means
If today is 25 october2019 the date can be greater thatn 1st October 2019
Thank you for suggestion
I have a CustomObject1__c
I want to put a condition where
IF the Status__c = 'XyW' then - CustomDateField is Mandatory && Date cannot be less than current month
Date can not be less than current month means
If today is 25 october2019 the date can be greater thatn 1st October 2019
Thank you for suggestion
I have gone through your question. The validation rule on the date should not less than the current Month.
Please follow the below to achieve this:-
Validation--->
if((Status__c == 'XYZ') && Month(Date__c) < Month(today()), true,false)
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
All Answers
We can create this through Validation Rule
As per your question what i understood is
If status ( picklist ) = 'xyz'
Then the custome Date field should be in the same month as you said it should be in October.
Create the validation rule in your custom object and paste this code in this
IF(ISPICKVAL( Status__c , 'B'), Month (Today()) != MONTH( Custom_Date_Field__c ), true)
Here i have taken Fields Status__C and my pick list value is B. You can change it according to yours.
If you are happy with the answer, please keep it as sloved.. :)
I have gone through your question. The validation rule on the date should not less than the current Month.
Please follow the below to achieve this:-
Validation--->
if((Status__c == 'XYZ') && Month(Date__c) < Month(today()), true,false)
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
I have gone through your question. I have created a validation rule for your scenario.
Here is my validation rule -
Status__c = 'XyW' && ( ISBLANK(Custom_Date__c) || ( MONTH(Custom_Date__c ) < MONTH( TODAY() ) ) )
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
With abouve all solution, if i put the year less than current year and month higher than current month, it fails
"Here is my validation rule -
Status__c = 'XyW' && ( ISBLANK(Custom_Date__c) || ( MONTH(Custom_Date__c ) (Link: https://casinohex.at/online-casinos/neue/) < MONTH( TODAY() ) ) )"
Thank you Ajay, I've tested already your code - it's really working,thank you