Timestamp Templating

The Timestamp field allows content writers to add a date and time.

Usage

Here’s an example of how to integrate a Timestamp field into your template.

  • ejs
  • pug
  • pug (API v1)
Copy
<span class="event-date">
  <%= PrismicDOM.Date(document.data.eventDate) %>
</span>
Copy
span.event-date !{ PrismicDOM.Date(document.data.eventDate) }
Copy
span.event-date !{ document.getTimestamp('event.date').toString() }