RSS Feed Display Template - Example of Specifying a Date Format Coding

As in a standard display template, you can configure an RSS feed display template so that each listed feed item includes a date (such as the Publication Date). There are several ways to do this.

You can use a simple code string to invoke the date as it appears in the external feed, without specifying a particular format:

<p>Published On: ${published}</p>

Or you can specify a date format:

<t:value id="fieldname" type="date" format="5">date appears here</t:value>

as in:

<t:value id="published" type="date" format="5">November 8, 2007</t:value>

When specifying a date format, you also need to specify the type; otherwise, the value from the feed is used.

For instance, you may want listed items to use the same date format as their originating external feed. The following date format renders dates that are provided in the format 2007-11-08T04:37:00+00:00 in the source code of the originating feed:

<t:value id="dc:date" type=date format=5></t:value>

This format renders as: November 08, 2008.

Note: dc:date syntax is used because the source feed is in RSS1.