---
title: Date.IsInCurrentYear – ตรวจสอบปีปัจจุบัน
url: https://www.thepexcel.com/functions/power-query/date-functions/date-isincurrentyear/
type: function-explainer
program: Power Query
syntax: date_isincurrentyear(value as any) as any
date: 2025-12-12
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 2
  usefulness: 5
---

# Date.IsInCurrentYear – ตรวจสอบปีปัจจุบัน

> ตรวจสอบปีปัจจุบัน

## คำอธิบาย

Date.IsInCurrentYear ตรวจสอบว่าวันที่นั้นตรงกับปีปัจจุบันหรือไม่

## Syntax

```excel
date_isincurrentyear(value as any) as any
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| value | Yes | any |  | ค่าที่ต้องการประมวลผล |

## ตัวอย่าง

### 1. ตัวอย่างที่ 1

```excel
date_isincurrentyear(data)
```

**ผลลัพธ์:** `true/false`

การใช้งานพื้นฐาน

### 2. ตัวอย่างที่ 2

```excel
date_isincurrentyear(#date(2025,12,13))
```

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

ใช้กับวันที่

### 3. ตัวอย่างที่ 3

```excel
let result = date_isincurrentyear(tomorrow) in result
```

**ผลลัพธ์:** `ผลลัพธ์สุดท้าย`

ใช้ในสูตร let...in

## หมายเหตุเพิ่มเติม

⚠️ ฟังก์ชันนี้ใช้สำหรับการตรวจสอบวันที่

## คำถามที่พบบ่อย

**Q: ฟังก์ชันนี้ใช้สำหรับอะไร**

Date.IsInCurrentYear ตรวจสอบว่าวันที่นั้นตรงกับปีปัจจุบันหรือไม่

**Q: ข้อมูลส่งเข้าจำเป็นต้องมีรูปแบบไหน**

ข้อมูลต้องเป็นค่าวันที่ (date) หรือวันที่และเวลา (datetime)

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

- [Microsoft Learn: Power Query M](https://learn.microsoft.com/en-us/powerquery-m/date-isincurrentyear) _(documentation)_

---

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