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
Rahul BorgaonkarRahul Borgaonkar 

Error using outputtext & param in Email Template for date field

Hi,

 

I am getting below error

 

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

 

when using

 

<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss'Z'}">
       <apex:param value="{!relatedTo.ReminderDateTime}"/>
</apex:outputText>

 

I have also tried

 

<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss'Z'}">       

        <apex:param value="{!relatedTo.ReminderDateTime}"/>

</apex:outputText>

 

but it is not working too.

 

ReminderDateTime field is from task table.

 

Can I kidnly request for a help.

 

Thanks,

 

Rahul

AshlekhAshlekh

Hi,

 

Try this one  

 

<apex:outputText value=" {0,date,yyyy.MM.dd G 'at' HH:mm:ss z}">       <apex:param value="{!NOW()}" />
   </apex:outputText>

or
<apex:outputTextvalue="{0, date, dd'/'MM'/'yyyy HH:mm:ss}>
   
<apex:paramvalue="{!Now()}">
</apex:param>

or

apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    <apex:param value="{!Today()}" /> 
</apex:outputText>
Thanks 
 

It it is your solution than mark as solution and Please give me kudo's if it help you.

 

 
Thanks
Ashlekh