function readOnly(count){ }
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 guys,
am getting date in this format.
this is sample date: Thu Aug 09 00:00:00 GMT 2012
how do i format it as 23/09/2012
Thank you!.
If you can use a ouputfield, it will be displayed automatically just like your example,
But if you are using a outputtext you an use like this
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}"> <apex:param value="{!YOURDATEVARAIBLE}"/> </apex:outputText>
Thank you for quick reply,
Let me rephrase my problem again.
I have a date as a string. This is my String
String myDateTime = "Thu Aug 09 00:00:00 GMT 2012". in my apex class.
What i wanted is to format this date to something like 23/09/2012.
Let us cast your string as date than you can use in to Visualforce just like first post,
Date myDate = date.valueOf(YourStringDateTime);
Now use mydate in VF like:
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}"> <apex:param value="{!myDate}"/> </apex:outputText>
If you can use a ouputfield, it will be displayed automatically just like your example,
But if you are using a outputtext you an use like this
Thank you for quick reply,
Let me rephrase my problem again.
I have a date as a string. This is my String
String myDateTime = "Thu Aug 09 00:00:00 GMT 2012". in my apex class.
What i wanted is to format this date to something like 23/09/2012.
Let us cast your string as date than you can use in to Visualforce just like first post,
Now use mydate in VF like: