• Robert Essen
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

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

Hi, i'm a complete newby,

i've been asked to create a validation rule on a Date/Time field. experation_date__c, can be set to a maximum of 3 months from now.

It keeps on giving me an error: Error: Incorrect parameter type for operator '-'. Expected Number, DateTime, received Date

any advise please. Thanks

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

Hi, i'm a complete newby,

i've been asked to create a validation rule on a Date/Time field. experation_date__c, can be set to a maximum of 3 months from now.

It keeps on giving me an error: Error: Incorrect parameter type for operator '-'. Expected Number, DateTime, received Date

any advise please. Thanks