> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Datetime Format

> Customize the datetime format injected into the team's system context.

```python datetime_format.py theme={null}
"""
Custom Datetime Format
======================

Customize the datetime format injected into the team's system context.
"""

from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.team import Team

# ---------------------------------------------------------------------------
# Create Members
# ---------------------------------------------------------------------------
scheduler = Agent(
    name="Scheduler",
    model=OpenAIResponses(id="gpt-5-mini"),
    role="Schedule meetings and events based on the current time.",
)

# ---------------------------------------------------------------------------
# Create Team
# ---------------------------------------------------------------------------
scheduling_team = Team(
    name="Scheduling Team",
    model=OpenAIResponses(id="gpt-5-mini"),
    members=[scheduler],
    add_datetime_to_context=True,
    datetime_format="%B %d, %Y %I:%M %p %Z",  # Human-readable format (e.g., March 09, 2026 02:30 PM UTC)
    timezone_identifier="US/Eastern",
)

# ---------------------------------------------------------------------------
# Run Team
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    scheduling_team.print_response(
        "Schedule a standup meeting for 30 minutes from now.", stream=True
    )
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `datetime_format.py`, then run:

    ```bash theme={null}
    python datetime_format.py
    ```
  </Step>
</Steps>

Full source: [cookbook/03\_teams/09\_context\_management/datetime\_format.py](https://github.com/agno-agi/agno/blob/main/cookbook/03_teams/09_context_management/datetime_format.py)
