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

> Документация по типу данных Date32 в ClickHouse, который хранит даты в более широком диапазоне по сравнению с Date

# Date32

Дата. Поддерживает диапазон дат от `1900-01-01` до `2299-12-31`. Хранится как знаковое 32-битное целое число в собственном порядке байтов, где значение представляет количество дней с `1900-01-01`. **Важно!** 0 соответствует `1970-01-01`, а отрицательные значения обозначают дни до `1970-01-01`.

**Примеры**

Создание таблицы со столбцом типа `Date32` и вставка в него данных:

```sql theme={null}
CREATE TABLE dt32
(
    `timestamp` Date32,
    `event_id` UInt8
)
ENGINE = TinyLog;
```

```sql theme={null}
-- Parse Date
-- - from string,
-- - from 'small' integer interpreted as number of days since 1970-01-01, and
-- - from 'big' integer interpreted as number of seconds since 1970-01-01.
INSERT INTO dt32 VALUES ('2100-01-01', 1), (47482, 2), (4102444800, 3);

SELECT * FROM dt32;
```

```text theme={null}
┌──timestamp─┬─event_id─┐
│ 2100-01-01 │        1 │
│ 2100-01-01 │        2 │
│ 2100-01-01 │        3 │
└────────────┴──────────┘
```

**См. также**

* [toDate32](/docs/ru/reference/functions/regular-functions/type-conversion-functions#toDate32)
* [toDate32OrZero](/docs/ru/reference/functions/regular-functions/type-conversion-functions#toDate32OrZero)
* [toDate32OrNull](/docs/ru/reference/functions/regular-functions/type-conversion-functions#toDate32OrNull)
