The format of date and datetime fields in Visualforce is controlled by the locale setting of the user's profile. For example, a US-based user sees dates in MM/DD/YYYY format, while a European user sees DD/MM/YYYY.
Sometimes it is appropriate to change this behavior or to display dates in a specific format regardless of the user's locale setting — for example, when your page must display dates consistently for all users regardless of their geographic location.
The date display format on a Visualforce page can be changed by using the language attribute on the <apex:page> tag. This attribute accepts an IETF language tag (a two-letter language code followed by a hyphen and a two-letter country code) and overrides the user's profile locale for date formatting on that specific page.
Setting the language attribute is most useful when your Visualforce page serves users from different regions and you need to enforce a consistent date format. For example, a European-facing page might enforce DD/MM/YYYY format for all users regardless of their individual locale settings.
To change the date display format, set the language attribute in your opening <apex:page> tag using the appropriate IETF language tag.
For Italian locale (DD/MM/YYYY format):
<apex:page language="it-IT">
For Spanish locale (DD/MM/YYYY format):
<apex:page language="es-ES">
The same pattern applies to all other supported Salesforce locales.
Use these IETF language tags with the language attribute:
language='fr-FR' — French (France), uses DD/MM/YYYYlanguage='de-DE' — German (Germany), uses DD.MM.YYYYlanguage='ja-JP' — Japanese (Japan), uses YYYY/MM/DDlanguage='en-GB' — English (United Kingdom), uses DD/MM/YYYYlanguage='en-US' — English (United States), uses MM/DD/YYYY000384965

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.