Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to check two things and based on outcome display some text. The two things are that the lastModified date of an opportunity is before one date and after another

I try:

<apex:outputPanel rendered="{!IF((relatedTo.opportunity__r.LastModifiedDate <= NOW() - 30) && (relatedTo.opportunity___r.LastModifiedDate >= NOW() - 60, true, false))}">Stalled</apex:outputpanel>

I get:

Error: Syntax error. Missing ')'

But can't see where one is missing?

Any tips

share|improve this question
up vote 2 down vote accepted

Try this one...

<apex:outputPanel rendered="{!IF((relatedTo.opportunity__r.LastModifiedDate <= NOW() - 30) && (relatedTo.opportunity___r.LastModifiedDate >= NOW() - 60), true, false)}">Stalled</apex:outputpanel>

It's not that one was missing per-se, its that it was in the wrong place (at the end).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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