# DayOfWeek

## Giới Thiệu

Function giúp chúng ta có thể lấy được thứ tự của ngày trong tuần bắt đầu như sau.

<table><thead><tr><th width="170">Thứ</th><th>Ngày Trong Tuần</th></tr></thead><tbody><tr><td>Chủ Nhật</td><td>0</td></tr><tr><td>Thứ Hai</td><td>1</td></tr><tr><td>Thứ Ba</td><td>2</td></tr><tr><td>Thứ Tư</td><td>3</td></tr><tr><td>Thứ Năm</td><td>4</td></tr><tr><td>Thứ Sáu</td><td>5</td></tr><tr><td>Thứ Bảy</td><td>6</td></tr></tbody></table>

Function nhận vào giá trị kiểu DateTime

<figure><img src="/files/oPTKaP6OJJUfJnRVkPmf" alt="DayOfWeek"><figcaption><p>Lấy thứ tự ngày trong tuần</p></figcaption></figure>

## Kết Quả

Với dữ liệu thời điểm viết bài là chủ nhật thì function trả về kết quả như hình bên dưới.

<figure><img src="/files/gl4i4TTlRIknFSuC3F9c" alt="DayOfWeek"><figcaption><p>Kết quả chạy function lấy về hôm nay là 0</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.taiamk.pro/function-ho-tro/datetime/dayofweek.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
