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

> ClickHouse의 Date 데이터 타입에 대한 문서

# Date

날짜입니다. 1970-01-01부터 지난 날짜 수를 2바이트(부호 없음)로 저장합니다. Unix Epoch 시작 직후부터 컴파일 단계에서 상수로 정의된 상한 임계값까지의 값을 저장할 수 있습니다(현재는 2149년까지이지만, 최종적으로 완전히 지원되는 마지막 연도는 2148년입니다).

지원되는 값 범위: \[1970-01-01, 2149-06-06].

날짜 값은 시간대 정보 없이 저장됩니다.

**예시**

`Date` 타입 컬럼이 있는 테이블을 생성하고 여기에 데이터를 삽입합니다:

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

```sql theme={null}
-- Date 파싱
-- - 문자열로부터,
-- - 1970-01-01 이후 경과 일수로 해석되는 '작은' 정수로부터,
-- - 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 │
└────────────┴──────────┘
```

**관련 항목**

* [날짜 및 시간을 다루는 함수](/ko/reference/functions/regular-functions/date-time-functions)
* [날짜 및 시간을 다루는 연산자](/ko/reference/operators#operators-for-working-with-dates-and-times)
* [`DateTime` 데이터 타입](/ko/reference/data-types/datetime)
