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
(function () { var date = new Date(), output = document.getElementById( 'output' ), dateString = (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear().toString().substr(2,2); output.innerHTML = dateString; })();
<apex:outputText value="{0, date, MMMM d',' yyyy}"> <apex:param value="{!contact.Birthdate}" /> </apex:outputText>
<apex:outputText value="{0, date, MMMM d',' yyyy}"> <apex:param value="{!NOW()}" /> </apex:outputText>
<apex:outputText value="string: {0,date,yyyy.MM.dd G 'at' HH:mm:ss z}"> <apex:param value="{!acct.CreatedDate}" /> </apex:outputText>
This will print the date out in the format December 14, 2013. The documentation can be found here (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_outputText.htm)
Javascript
Fiddle: http://jsfiddle.net/ubR5m/ (http://jsfiddle.net/ubR5m/)
or if all you need is the current date printed out in that format then you can use this:
OR
JavaDocs for SimpleDateFormat (http://docs.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html)
Hope this will help you.
Thanks
karthik