Salesforce :SDocs Date or Date/Time Format

In S-Docs, we can actually choose the format of Date or Date/Time to display in the document.

 

For Example, There is a Date field in Opportunity called Won_Date__c. The date displayed in this field is in 30/12/2013 (dd/MM/YYYY) format.

What if we want it to be displayed as 30 December 2013?

 

Here is how it can be formatted:

For Normal queried fields:

Specify the format here:

  • {{!Opportunity.Won_Date__c dd MMMM yyyy}}. Result will display date in 30 December 2013.

As for SOQL or Related lists fields, just add in below through the field source code:

  • <column format-date= “dd/MMMM/yyyy“> to display 30 December 2013  OR
  • <column format-date= “dd/MMM/yyyy“> to display as 30 Dec 2013

As for Date/Time field, we can also choose to only display the time instead of date/time.

 

For normal query field:

  • {{!Opportunity.Won_Date__c hh:MM aa}} to display hours and minutes in am or pm format

As for SOQL or Related lists fields, use:

  • <column format-date= “hh:MM aa“>Won_Date__c</column>

!Note: S Doc basically follow java script formats, for more format example, refer here.