Fields

Timestamp

Last updated

A screenshot of a timestamp field in the Page Builder.

A timestamp field in the Page Builder.

The timestamp field allows content writers to select a date and time.

The timestamp is saved in YYYY-MM-DDTHH:MM:SS+0000 format, like 2026-05-22T11:41:07+0000. The timestamp is always UTC (+0 offset).

Timestamp field values can be formatted and displayed like any JavaScript date using the asDate() helper from @prismicio/client.

import { asDate } from "@prismicio/client";

const timestamp = asDate(slice.primary.release_timestamp);

<span>{timestamp?.toLocaleDateString("en-US")}</span>;

Add a timestamp field to a content model

Timestamp fields are added using the Type Builder, a tool for building by hand, or the Prismic CLI, a tool for AI agents.

Use timestamp fields

Timestamp fields can be used anywhere a timestamp is needed. It is often helpful to first convert the timestamp to a JavaScript Date object using asDate from @prismicio/client.

import { asDate } from "@prismicio/client";

function Slice() {
  const timestamp = asDate(slice.primary.release_timestamp);

  return <span>{timestamp?.toLocaleDateString("en-US")}</span>;
}

Check if a timestamp field has a value

Use isFilled.timestamp() from @prismicio/client to check if a timestamp field has a value.

import { isFilled } from "@prismicio/client";

if (isFilled.timestamp(slice.primary.my_timestamp_field)) {
  // Do something if `my_timestamp_field` has a value.
}

Learn more about isFilled

API response

Here is what a timestamp field looks like from the Content API:

{
  "example_timestamp": "2030-01-31:05:00:00+0000"
}
Was this page helpful?