Skip to main content
Conga Support

Auto-generated Content Data-Format Attribute


The data-format attribute allows you to adjust the way dates are displayed in auto-generated content.  In order for data-format to work, the content must first be classed as class="date" or class="datetime".  In an auto-generated table this class can be added using Cell Properties, otherwise it will have to be done in source code.  

Syntax: data-format="%d/%m/%y"
where the order of d, m, and y can be changed according to your preferences.

In addition to changing the order of month, day, and year, using a capital Y will display the full four digit year, whereas lower case y will only display the last two digits.
The letter A will display the day of the week written out (i.e. "Thursday"), while the letter B will display the month in written out form (i.e. "July").


<td class="date" data-format="%-m/%-d/%Y">[ExpirationDate]</td>
Output: 7/7/2017

<span class="date" data-format="%Y-%m-%d">[CreatedDate]</span>
Output: 2017-07-07

<p class="datetime" data-format="%A, %B %-d, %Y">[ModifiedDate]</p>
Output: Thursday, July 7, 2017
  • Was this article helpful?