function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MDeveloperMDeveloper 

how to change date format in site.com?

hi,

 

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.  

Sri549Sri549

 

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}"/>
       </apex:outputText>

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,
Srinivas
SFDC Certified Developer

 

MDeveloperMDeveloper

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}" />
</apex:outputText>

 

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.

Thanks,
Subhani,
Salesforce Certified Developer,
www.mydbsync.com