You need to sign in to do that
Don't have an account?
Robert Essen
A validation rule on a Date/Time field
Hi, i am struggling getting the right formule.
I've been asked to create a validation rule on a Date/Time field. Expiration_date__c, can be set to a maximum of 4 weeks from Creation date
This is what i have so far (since the original request was 2 Months), but it doesn't give me the right expiration date
IF(AND(Value(TEXT((YEAR(DATEVALUE(DateExpired__c))*12+MONTH(DATEVALUE(DateExpired__c)))-
(YEAR( TODAY() )*12+MONTH( TODAY())))) > 2,OR(ISPICKVAL(Status,'Draft'),ISPICKVAL(Status,'Review'))),true,false)
any advise is welcome, thanks
Kind regards
As noew the formule is for 4 weeks means 28 days You can use direcltly the below formula.
If this solution helps, Please mark it as best answer.
Thanks,
This would assume that there is a value in the CreatedDate (which it won't have when creating the record), so you'd probably want to add a check for Expiration_date__c > TODAY() + 28 for when CreatedDate doesnt have a value.
Thanks for thinking along guys,
Not sure if this covers the need though.
The requirements actually is, to give some staff (by permission set) the posibillity to update a Date/time field (on quote) named DateExpired__c, which is already filled with a (future) date (i.e. 26-3-2022 1:00) to be able to extend it with a maximum of 1 month ( so 26-4-2022 1:00)
thanks for you help