---
title: "DATE_TRUNC"
description: "DATE_TRUNC SQL \uD568\uC218\uB294 datetime\uC758 \uC808\uC0AD\uB41C \uAC12\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/docs/invantive-universalsql/grammar/sql-functions/date-trunc
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/date-trunc
updated: 2026-12-04T13:33:23Z
license: https://documentation.invantive.eu/ko/
---

## 구문
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> DATE_TRUNC[DATE_TRUNC]:::quoted
    DATE_TRUNC --> End((END))
```

## 목적
`DATE_TRUNC` SQL 함수는 `datetime`의 절삭된 값을 반환합니다.

참조: [[DATE_CEIL]], [[DATE_FLOOR]] 및 [[DATE_ROUND]].

매개변수:
- Precision (`varchar2`): one of `millenium`, `century`, `decade`, `year`, `quarter`, `month`, `week`, `day`, `hour`, `minute`, `second`, `milliseconds` and `microseconds`. 한 주는 일요일부터 시작합니다.
- 날짜/시간(`datetime`): 절삭할 날짜/시간.

반환: 입력 날짜/시간을 정의된 정밀도로 절삭한 값을 `datetime`로 반환합니다. 목록에 없는 정밀도를 지정하면 원래 값이 반환됩니다.

## 예시
다음 예는 연도 단위로 시스템 시간의 절삭된 값을 조회합니다:
```sql
select date_trunc('year', to_date('19870315', 'YYYYMMDD'))

-------------------
01-01-1987 00:00:00
```
다음 예는 월 단위로 날짜의 절삭된 값을 조회합니다:
```sql
select date_trunc('month', to_date('20990317', 'YYYYMMDD'))

-------------------
01-03-2099 00:00:00
```
다음 예는 주 단위로 목요일 1 10월 2026의 절삭된 값을 조회합니다. 주는 일요일에 시작합니다:
```sql
select date_trunc('week', to_date('20261001', 'YYYYMMDD'))

-------------------
27-09-2026 00:00:00
```

