# format_timestamp

> **Function** in `deepagents_code`

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

Format ISO timestamp for display (e.g., 'Dec 30, 6:10pm').

## Signature

```python
format_timestamp(
    iso_timestamp: str | None,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `iso_timestamp` | `str \| None` | Yes | ISO 8601 timestamp string, or `None`. |

## Returns

`str`

Formatted timestamp string or empty string if invalid.

---

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