Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi
I need help in retrieving the User/Company locale date format in Visualforce (or APEX).
For example: dd/mm/yyyy or mm/dd/yyyy
Thanks in advance :-)
Hi,
OutputField will display the date according to the user's time zone. OutputText or free tag expressions will be shown in GMT.
Example:
<apex:page>
<apex:outputText value="The unformatted time right now is: {!NOW()}" />
<br/>
<apex:outputText value="The formatted time right now is:
{0,date,yyyy.MM.dd G 'at' HH:mm:ss z}">
<apex:param value="{!NOW()}" />
</apex:outputText>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks but I need the format so I can pass it to a JS calendar component I'm using, so the calendar will display the date in the correct date locale...
Any suggestions?
Hi,
OutputField will display the date according to the user's time zone. OutputText or free tag expressions will be shown in GMT.
Example:
<apex:page>
<apex:outputText value="The unformatted time right now is: {!NOW()}" />
<br/>
<apex:outputText value="The formatted time right now is:
{0,date,yyyy.MM.dd G 'at' HH:mm:ss z}">
<apex:param value="{!NOW()}" />
</apex:outputText>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks but I need the format so I can pass it to a JS calendar component I'm using, so the calendar will display the date in the correct date locale...
Any suggestions?