I am using a visual force template and want to add some logic which will decide whether to display something based on a date field in an Opportunity being less than a certain value.

I try:

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

I get: Error: Unknown function System.now. Check spelling

Any tips?



I believe all you need to do is replace System.now() with NOW().

  • does NOW() - 2 mean minus days or 2 minutes?
    – dublintech
    Jan 3 '13 at 16:09
  • @dublintech You can print those on page or inspect through javascript alert to find Jan 3 '13 at 16:21
  • 1
    @dublintech it will be minus 2 days Jan 3 '13 at 16:46

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.