+ Start a Discussion
sam_Adminsam_Admin 

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}"/>
</apex:column>
 
James5James5
Try this:

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

It's untested but looks right.