---
title: Date.DayOfYear – หาลำดับวันในหนึ่งปี
url: https://www.thepexcel.com/functions/power-query/date-functions/date-dayofyear/
type: function-explainer
program: Power Query
syntax: Date.DayOfYear(dateTime as any) as nullable number
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 2
  usefulness: 5
---

# Date.DayOfYear – หาลำดับวันในหนึ่งปี

> หาลำดับวันในหนึ่งปี

## คำอธิบาย

คืนค่าวันที่เท่าไหร่ของปี (1-366)

## Syntax

```excel
Date.DayOfYear(dateTime as any) as nullable number
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| dateTime | Yes | date |  | วันที่ |

## ตัวอย่าง

### 1. วันของปี

```excel
Date.DayOfYear(#date(2025,2,1))
```

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

1 ก.พ. เป็นวันที่ 32 ของปี

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

- [Date.Day – ดึงค่าวันที่ (1-31) จากข้อมูลวันที่](https://www.thepexcel.com/functions/power-query/date-functions/date-day/)
- [Date.WeekOfYear – หาเลขที่ของสัปดาห์ในปี](https://www.thepexcel.com/functions/power-query/date-functions/date-weekofyear/)

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

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

---

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