You need to sign in to do that
Don't have an account?
Sandy singh
user has entered date is not same in view mode
Hi All,
I have problem with date format , once user has entered date '01/18/2012' through visualforce page and if again trying to view it on some other visualforce page its display as "Wed Jan 18 00:00:00 GMT 2012". I need to view it on same way which user has entered.
Can any one help me if any global setting is possible in salesforce so that all date field should be same which user has entered.
Thanks in advance,
Sandy
Hi,
If you want to display the date in this format '01/18/2012 instead of "Wed Jan 18 00:00:00 GMT 2012"on the VF page .you have to change the format of the date on the VF page. You can use the date.format method because date.format return the date into string format. Or you can pass the format of the date in the output text field in which you are displaying the date.
use below code snippet as reference :
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
<apex:param value="{!contact.Birthdate}" />
</apex:outputText>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.