---
title: "DAYOFWEEK"
description: "DAYOFWEEK SQL \uD568\uC218\uB294 \uB0A0\uC9DC\uC5D0\uC11C \uD55C \uC8FC\uC758 \uC694\uC77C\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/docs/invantive-universalsql/grammar/sql-functions/dayofweek
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/dayofweek
updated: 2026-12-04T13:34:08Z
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)) --> DAYOFWEEK[DAYOFWEEK]:::quoted
    DAYOFWEEK --> End((END))
```

## 목적
`DAYOFWEEK` SQL 함수는 날짜에서 한 주의 요일을 가져옵니다. 요일 번호는 일요일의 경우 0부터 시작하며, 토요일의 경우 6에서 끝납니다.

매개변수:
- 입력(`datetime`): 날짜/시간.

반환값: `int32` 형태의 한 주의 요일.

## 예시
다음 예제는 날짜의 주 내 요일 번호를 조회합니다:
```sql
select dayofweek(to_date('20260603', 'YYYYMMDD'))

-------------------
3
```
다음 예제는 날짜의 주 내 요일 번호를 조회합니다:
```sql
select dayofweek(to_date('20260531', 'YYYYMMDD'))

-------------------
0
```

