Loading

Change the display format of a Date field on a Visualforce page

게시 일자: Aug 21, 2024
상세 설명

The format of date and date time fields is controlled by the locale setting of the profile of the user that displays them. 

Sometimes it is appropriate to change this or to allow the user to select a different language format (i.e. DD/MM/YYYY, which is the European format as opposed to MM/DD/YYYY which is the format used in the US)

This format can be changed by using the "language" attribute on the apex:page tag.

솔루션

In order to change the language of a page the language attribute must be set appropriately in the <apex:page> tag.

It must use the correct language code for example if Italian was the language that was desired the correct attribute to use would be 

<apex:page language="it-IT">

For Spanish it would be

<apex:page language="es-ES">

and so on for all the other supported languages.

How to change Date format in Visualforce Page?

Knowledge 기사 번호

000384965

 
로드 중
Salesforce Help | Article