Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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?


share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
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 –  Mohith Shrivastava Jan 3 '13 at 16:21
@dublintech it will be minus 2 days –  Kevin O'Hara Jan 3 '13 at 16:46

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.