function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.