# format_message_timestamp

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/formatting/format_message_timestamp)

Format a message timestamp for display.

Shows only the time of day for messages from the current local date and
prefixes the date otherwise. The 12- versus 24-hour clock follows the
system configuration (see `uses_24_hour_clock`).

## Signature

```python
format_message_timestamp(
    timestamp: float,
) -> str | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `timestamp` | `float` | Yes | Unix epoch timestamp. |

## Returns

`str | None`

A formatted timestamp, or `None` when invalid.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/d1c6946218b4f0f86ab7b02b6bb6af1e4b75cede/libs/code/deepagents_code/formatting.py#L112)