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>
2
  • What type of field is Entry_Date__c?
    – Adrian Larson
    Commented Nov 7, 2016 at 13:13
  • @Adrian Larson Date Field Commented Nov 7, 2016 at 13:24

1 Answer 1

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>
2
  • Ah, beat me to it.
    – Adrian Larson
    Commented Nov 7, 2016 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
    Commented Nov 7, 2016 at 13:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .