0
IF(LastActivityDate <= 90 Day, checked = true, checked = false)

Can someone please help me with this formula? I am getting a syntax error and I think it might have to do with the Day, but not 100% sure.

  • What doeschecked = true mean? Are you trying to set a field? Or do a Validation Rule? Or something else? – Sebastian Kessel Feb 22 '16 at 18:37
2

A Boolean operator is already a Boolean. Therefore, all you need to do is compare to if it's less than 90 days. Subtracting two dates results in a number in terms of number of days. So, your formula should be either:

// Displays checked if it has been more than 90 days
TODAY() - DATEVALUE(LastActivityDate) > 90

--- or ---

// Displays checked if it has not yet been 90 days
TODAY() - DATEVALUE(LastActivityDate) <= 90
1

Try this:

 (Now() - LastActivityDate) <= 90
  • Shouldn't it be TODAY()? – Adrian Larson Feb 22 '16 at 18:35
  • I am not sure whether its Date or DateTime. Because I tried this in my DE org and it worked fine IF((Now()- CreatedDate) <= 90,true,false). – karthikselva Feb 22 '16 at 18:39
  • 1
    Fair enough. Just fyi IF(condition, true, false) is identical to (and more verbose than) just condition. – Adrian Larson Feb 22 '16 at 18:41
  • Yeah I observed the edit, it is short and sweet now :) – karthikselva Feb 22 '16 at 18:43
  • I went with this: TODAY() - LastActivityDate) <= 90 – Michelle Feb 23 '16 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.