> For the complete documentation index, see [llms.txt](https://docs.contextual.io/documentation-and-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextual.io/documentation-and-resources/components-and-data/object-types/object-type-details/data-schema/generated-properties/dates-and-times.md).

# Dates and Times

Generate a Zulu Date and/or Time value for a property in your schema, which will be generated and added to the Record at the time a Record is created. Use the following variables in the `format` as you see fit to customize the generated value based on your needs.

* If format is unspecified, the default pattern is `2024-05-09T15:28:51.572Z`.
* `yyyy` = the year as 4 digits
* `M` = the month as 1 or 2 digits
* `MM` = the month as 2 digits
* `d` = the day as 1 or 2 digits
* `dd` = the day as 2 digits
* `D` = the day, month and year as `5/9/2024`
* `DD` = the day, month and year as `May 9, 2024`
* `h` = the hour as 1 or 2 digits, 12 hour clock
* `HH` = the hour as 2 digits, 24 hour clock
* `m` = minute as 1 or 2 digits
* `mm` = minute as 2 digits
* `ss` = second as 2 digits
* `SSS` = millisecond as 3 digits
* `a` = `AM` or `PM`
* `t` = time as `3:06 PM`
* `tt` = time as `3:06:22 PM`
* `T` = time as `15:06`
* `TT` = time as `15:06:22`
* `'custom string'` = the custom string value

{% tabs %}
{% tab title="2024-05-09T15:28:51.572Z" %}
{% code lineNumbers="true" %}

```json
  "properties": {
    "myPropertyName": {
      "type": "string",
      "generate": {
        "type": "datetime",
        "format": ""
      }
    }
  }
```

{% endcode %}
{% endtab %}

{% tab title="May 9, 2024" %}
{% code lineNumbers="true" %}

```json
  "properties": {
    "myPropertyName": {
      "type": "string",
      "generate": {
        "type": "datetime",
        "format": "DD"
      }
    }
  }
```

{% endcode %}
{% endtab %}

{% tab title="5/9/2024, 3:06 PM" %}
{% code lineNumbers="true" %}

```json
  "properties": {
    "myPropertyName": {
      "type": "string",
      "generate": {
        "type": "datetime",
        "format": "D', 't"
      }
    }
  }
```

{% endcode %}
{% endtab %}

{% tab title="3:06 PM" %}
{% code lineNumbers="true" %}

```json
  "properties": {
    "myPropertyName": {
      "type": "string",
      "generate": {
        "type": "datetime",
        "format": "t"
      }
    }
  }
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.contextual.io/documentation-and-resources/components-and-data/object-types/object-type-details/data-schema/generated-properties/dates-and-times.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
