πXML Time
Format dates in XML sitemaps and RSS feeds using the XML Time component.
Last updated
Was this helpful?
Format dates in XML sitemaps and RSS feeds using the XML Time component.
The XML Time component converts machine-readable date and time values to ISO 8601 format. This is essential for generating valid XML feeds like RSS, Atom, and sitemaps that require standardized date formats.
Use XML Time for:
RSS feed publication dates (<pubDate>)
Atom feed <updated> and <published> elements
Sitemap <lastmod> timestamps
Any XML output requiring ISO 8601 formatted dates
Drag an XML Time component from Components > XML onto your canvas
Bind the datetime property to a date value from your CMS or data source
The component outputs the date in ISO format (e.g., 2024-01-15T10:30:00.000Z)
datetime
Date/String
The date value to convert. Accepts a JavaScript Date object, ISO string, or timestamp.
dateStyle
String
Controls the output format style for the date.
When building an RSS feed with a Collection, use XML Time to format publication dates:
For XML sitemaps, XML Time ensures proper date formatting:
To display dynamic dates from your CMS:
Select the XML Time component
In Settings, click the binding icon next to datetime
Open the Expression editor
Bind to your date field: Collection Item.publishedAt
Time
Human-readable dates (e.g., "January 15, 2024")
Displaying dates to users
XML Time
ISO 8601 format (e.g., "2024-01-15T10:30:00.000Z")
Machine-readable XML/RSS feeds
XML Time renders the date string directly without any HTML wrapper
The ISO 8601 format is universally recognized by feed readers and XML parsers
Always ensure your source date is valid; invalid dates will produce unexpected output
XML Node β Create XML elements for feeds
Time β Display human-readable dates
Collection β Loop through data for feed items
Last updated
Was this helpful?
Was this helpful?
<item>
<title>Article Title</title>
<pubDate>
<!-- XML Time outputs: 2024-01-15T10:30:00.000Z -->
</pubDate>
</item><url>
<loc>https://example.com/page</loc>
<lastmod>
<!-- XML Time outputs the ISO date -->
</lastmod>
</url>