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
SapanaSapana 

Renders="PDF" showing a date field as date time field

When I create a vf page with renderAs="PDF " attribute it displays an outputfield  as DATETIME  field  though  having a data type as DATE

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 

You can use the apex:outputtext instead of apex:outputfield

 

Try below code sample

 

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

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.