> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Documentación del tipo de dato Date en ClickHouse

# Date

Una fecha. Se almacena en dos bytes como el número de días transcurridos desde 1970-01-01 (sin signo). Permite almacenar valores desde justo después del inicio de la época Unix hasta el umbral superior definido por una constante durante la compilación (actualmente, hasta el año 2149, aunque el último año totalmente compatible es 2148).

Rango de valores admitido: \[1970-01-01, 2149-06-06].

El valor de fecha se almacena sin zona horaria.

**Ejemplo**

Creación de una tabla con una columna de tipo `Date` e inserción de datos en ella:

```sql theme={null}
CREATE TABLE dt
(
    `timestamp` Date,
    `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 dt VALUES ('2019-01-01', 1), (17897, 2), (1546300800, 3);

SELECT * FROM dt;
```

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

**Véase también**

* [Funciones para trabajar con fechas y horas](/es/reference/functions/regular-functions/date-time-functions)
* [Operadores para trabajar con fechas y horas](/es/reference/operators/index#operators-for-working-with-dates-and-times)
* [tipo de dato `DateTime`](/es/reference/data-types/datetime)
