can anyone help me out with validation rule for months
# At least 9 months or more from today
it should be like the input 5 Jan should get end of Oct 31,or the input of 10 Jan should get OCT 31 ,or any date in JAN will get me the end date 31 OCT
can anyone help me out with validation rule for months
# At least 9 months or more from today
it should be like the input 5 Jan should get end of Oct 31,or the input of 10 Jan should get OCT 31 ,or any date in JAN will get me the end date 31 OCT
A simple formula that will do it is where I have 2 custom fields both of Date data type, Start_Date__c and Target_Test__c. You could change the <> to a >= to make it greater than or equal to the date.
Target_Test__c <> CASE( MONTH(Start_Date__c) ,
1, DATE(YEAR(Start_Date__c),10,31) ,
2, DATE(YEAR(Start_Date__c),11,30),
3, DATE(YEAR(Start_Date__c),12,31),
4, DATE(YEAR(Start_Date__c)+1,1,31),
5, DATE(YEAR(Start_Date__c)+1,02,28),
6, DATE(YEAR(Start_Date__c)+1,03,31),
7, DATE(YEAR(Start_Date__c)+1,04,30),
8, DATE(YEAR(Start_Date__c)+1,05,31),
9, DATE(YEAR(Start_Date__c)+1,06,30),
10, DATE(YEAR(Start_Date__c)+1,07,31),
11, DATE(YEAR(Start_Date__c)+1,08,31),
12, DATE(YEAR(Start_Date__c)+1,09,30),
DATE(YEAR(Start_Date__c),10,31))
If you need the Specific Date returned then I would think using a formula field with Date return type and the formula from 'CASE..' onwards would work better than manual entry.