+ 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.