+ Start a Discussion

how to change date format in site.com?



i want to change date format in site.com.  i have displed date with expressions {!job_date} and it displying date as "Wed Sep 18 12:13:23 GMT 2013" but i need date firmat like "mm-dd-YY" .  please help me.  



Hi Mdeveloper


This following code may give you expected solution


<apex:outputLabel value="Date"> </apex:outputLabel>  
       <apex:outputText value=" {0,date,MM/dd/yyyy}">
          <apex:param value="{!o.CreatedDate}"/>

Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You,
SFDC Certified Developer



thanks for your relpy. i have try your code but it is not working.  i need date formate in community pages (site.com CMS) and i think community pages doesn't support any programing language

Subhani PSubhani P

Hi Mdeveloper,


<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    <apex:param value="{!contact.date}" />


chek the above code. it may helps to solve your issue.


If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Salesforce Certified Developer,