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
BobPBobP 

visualforce conditional formatting If month is in date field

I have a visualforce page that I want to use a date field to rerender an output panel if the date is a certain month.

Currently I'm using a number field for this section but i would like to use a date field called Contract_Start_Date__c.

I'm not sure how to format the formula to check for what month it is from the Contract Start date. .  

<apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 12  ,true,false)}">

I would like to do something like this below
{!IF(MONTH (et.Contract_Start_Date__c)  == 12  ,true,false))}
Best Answer chosen by BobP
Dushyant SonwarDushyant Sonwar
HI Bob ,

Is this not working? what error are you getting? Could you post the error message , it will help others to debug the issue.
<apex:outputPanel layout="none" rendered="{!MONTH (et.Contract_Start_Date__c)  == 12}">