Configure the Timestamp Field

This article explains what the Timestamp field is and how to configure it in the Custom Type builder.


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

Screenshot of the timestamp field in the drag-and-drop editor.

Timestamp vs. Date

This field is different from the Date field, which does not include a time of day.

The visual builder

When configuring a Timestamp field, you'll see the options to set the Field name, API ID, and Field placeholder.

Screenshot of the timestamp field editor.

JSON model

The following table displays the JSON configuration options available in the JSON editor.

type

string (required)

Value must be Timestamp

config

object

Object for the configuration options

config.placeholder

string

A user-friendly placeholder for the field in the entry editor

config.label

string

The label that shows up for the field in the document editor

config.default

string

If set to now, it will automatically fill with today's date and the current time. The default value will only apply to newly created documents. When you set or change the default value, it will not change existing documents.

Example JSON configuration

The following JSON defines a Timestamp field with a default value of today’s date and the current time:

Copy
"example_timestamp" : {
  "type" : "Timestamp",
  "config" : {
    "label" : "Created On",
    "default" : "now"
  }
}

API response example

Here is an API response example of a Timestamp field with the API ID of example_timestamp:

Copy
// API response example of a Timestamp field

{
 //...
 "example_timestamp":"2020-06-27T05:00:00+0000"
}

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.