API version: 0.3.0

---

# Datetime

`datetime` holds a point in time as an [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) string, i.e. a date and
a time with a time zone offset.

| Value              | Example                                                 |
| ------------------ | ------------------------------------------------------- |
| RFC 3339 date time | `"2026-01-31T12:00:00+00:00"`, `"2026-01-31T12:00:00Z"` |

## Settings

This type has no settings of its own, it supports the [settings of every property](/reference/schemas.md#properties).

## Storage

| Database      | Stored as                  | Notes                                                                                                                           |
| ------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Neo4j         | native `STRING` (RFC 3339) | (default)                                                                                                                       |
| MongoDB       | `string`                   | with `"storage": "document"` or the [placement role](/reference/schemas/placement.md#placement-roles) `scalar` moved to MongoDB |
| Elasticsearch | `date`                     | search copy, see below                                                                                                          |

The [search copy](/reference/databases/elasticsearch.md) is written unless the property or the type sets `"search": false`.
Where a property is stored is explained in [placement](/reference/schemas/placement.md).

## Indices

`exact`, see [indices](/reference/indices.md). Nested properties can be indexed as well, see
[nested properties](/reference/indices.md#nested-properties).

## Limits

The value has to contain a date, a time and a time zone, which is a numeric offset with a colon (`+01:00`) or `Z` for
UTC, e.g. `2026-01-31T12:00:00+00:00` or `2026-01-31T12:00:00Z`. Fractions of seconds, offsets without a colon,
impossible dates and dates without a time are rejected, use `string` for them. The same format applies to values of this
type inside of `object` properties, `additionalProperties` and `list` items; they are stored as the strings which the
request contained.

## Example

Schema:

```json
{
  "type": "datetime",
  "index": "exact"
}
```

Input and output:

```json
{
  "data": {
    "value": "2026-01-31T12:00:00+00:00"
  }
}
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [String](/reference/schemas/types/string.md)

Next: [Element id](/reference/schemas/types/element-id.md)
