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.

1
  • What doeschecked = true mean? Are you trying to set a field? Or do a Validation Rule? Or something else? Commented Feb 22, 2016 at 18:37

2 Answers 2

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
  • Ha. Good catch on wrong operator.
    – Adrian Larson
    Commented Feb 22, 2016 at 18:44
1

Try this:

 (Now() - LastActivityDate) <= 90
5
  • Shouldn't it be TODAY()?
    – Adrian Larson
    Commented Feb 22, 2016 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). Commented Feb 22, 2016 at 18:39
  • 1
    Fair enough. Just fyi IF(condition, true, false) is identical to (and more verbose than) just condition.
    – Adrian Larson
    Commented Feb 22, 2016 at 18:41
  • Yeah I observed the edit, it is short and sweet now :) Commented Feb 22, 2016 at 18:43
  • I went with this: TODAY() - LastActivityDate) <= 90
    – Michelle
    Commented Feb 23, 2016 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .