0

I am trying to change the Date Format on VF Page but it is giving me the following error

The value attribute on is not in a valid format. It must be a positive number, and of type Number, Date, Time, or Choice.

Here is my Code

<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    <apex:param value=" {!Score.Entry_Date__c}"/>
</apex:outputText>
4
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    <apex:param value=" {!Score.Entry_Date__c}"/>
</apex:outputText>

It looks like you are recieving the error due to the space you have prior to {!Score......

Please try this.

<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    <apex:param value="{!Score.Entry_Date__c}"/>
</apex:outputText>
  • Ah, beat me to it. – Adrian Larson Nov 7 '16 at 13:30
  • Very bad error reporting, iv seen people spend a lot of time on silly formatting errors that SF do not report clear enough. – TSmith Nov 7 '16 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.