You need to sign in to do that
Don't have an account?

Localized Date with Visualforce
I am trying to localize a date field in Visualforce and I can't apply the end-users locale. I know I can use the outputField component but I want to manipulate the positioning and output differently. So I am trying to use outputtext component. I am able to output it as I like, but I am not able to apply the end-users locale.
Here is a snippet of code:
<apex:page controller="controllertest" > <apex:form> <apex:outputText value="The formatted time right now is: {0,date, EEEEEEE, d MMM yyyy}"> <apex:param value="{!d}" /> </apex:outputText> </apex:form> </apex:page>
No matter what locale or language the user is logged in with, I get "The formatted time right now is: Wednesday, 27 Oct 2010".
Anyone know how I can apply locale to this VF snippet?
Tryout this sample code :
<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>
Hope this helps.
Using above example cannot be localized time zone to user's locale but using simple apex method you can do it
Ex:
Apex Code:
VF Block
-Suresh
That applies the timezone dynamically but it does not render the day of the week based off language. It doesn't convert Friday to viernes (for example).