---
title: Date.EndOfWeek – หาวันสิ้นสัปดาห์
url: https://www.thepexcel.com/functions/power-query/date-functions/date-endofweek/
type: function-explainer
program: Power Query
syntax: "Date.EndOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as any"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 2
  usefulness: 5
---

# Date.EndOfWeek – หาวันสิ้นสัปดาห์

> หาวันสิ้นสัปดาห์

## คำอธิบาย

คืนค่าวันสุดท้ายของสัปดาห์

## Syntax

```excel
Date.EndOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as any
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| dateTime | Yes | date |  | วันที่ |
| firstDayOfWeek | No | number |  | วันเริ่มสัปดาห์ |

## ตัวอย่าง

### 1. วันอาทิตย์ถัดไป

```excel
Date.EndOfWeek(DateTime.LocalNow(), Day.Monday)
```

**ผลลัพธ์:** `Date`

หาวันอาทิตย์ (ถ้าเริ่มจันทร์) ของสัปดาห์นี้

## ฟังก์ชันที่เกี่ยวข้อง

- [Date.StartOfWeek – หาวันต้นสัปดาห์](https://www.thepexcel.com/functions/power-query/date-functions/date-startofweek/)
- [Date.DayOfWeek – คืนค่าตัวเลขลำดับวันในสัปดาห์](https://www.thepexcel.com/functions/power-query/date-functions/date-dayofweek/)

## แหล่งข้อมูลเพิ่มเติม

- [PowerQuery.how](https://powerquery.how/date-endofweek/) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/power-query/date-functions/date-endofweek/](https://www.thepexcel.com/functions/power-query/date-functions/date-endofweek/)_
