+ Start a Discussion

Syntax error in visualforce

What am I doing wrong? If the date is less than today then it has to be red if it is greater than today then it should be green

<apex:column >
              <apex:facet name="header">Expires</apex:facet>
             <apex:outputText style="font-weight: bold;color:{!if(ib.verboseWarrantyExpirationDate < {!today()}, 'red', if(ib.verboseWarrantyExpirationDate > {!today()},'green'))};" value="{!ib.verboseWarrantyExpirationDate}"/>
Try this:

if(ib.verboseWarrantyExpirationDate < today(), 'red', if(ib.verboseWarrantyExpirationDate > today(),'green'))

It's untested but looks right.