Sample Code:
Visualforce page:
Visualforce page:
- <apex:page controller=“Sample” >
- <apex:form >
- <apex:outputText value=“{0,date,dd’/’MM’/’yyyy}” >
- <apex:param value=“{!temp}”/>
- </apex:outputText>
- </apex:form>
- </apex:page>
Apex Controller:
- public with Sharing class Sample {
- public Date gettemp() {
- Date d = date.ValueOf(‘2013-12-10’);
- return d;
- }
- public sample() {}
- }
Output: