---
title: List.DateTimeZones – สร้าง List ของค่า วันที่ เวลา และ Time Zone
url: https://www.thepexcel.com/functions/power-query/list-functions/list-datetimezones/
type: function-explainer
program: Power Query
syntax: "List.DateTimeZones(start as datetimezone, count as number, step as duration) as list"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 3
  difficulty: 3
  usefulness: 3
---

# List.DateTimeZones – สร้าง List ของค่า วันที่ เวลา และ Time Zone

> สร้าง List ของ วันที่ เวลา และ Time Zone

## คำอธิบาย

List.DateTimeZones คืน List ของค่า datetimezone โดยเริ่มจากค่าเริ่มต้น เพิ่มทีละช่วงเวลา (duration) ตามจำนวนครั้งที่ระบุ

## Syntax

```excel
List.DateTimeZones(start as datetimezone, count as number, step as duration) as list
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| start | Yes | datetimezone |  | ค่า วันที่และเวลาพร้อม Time Zone เริ่มต้น (datetimezone) ของ List |
| count | Yes | number |  | จำนวนสมาชิก datetimezone ที่ต้องการสร้างใน List |
| step | Yes | duration |  | ช่วงเวลา (duration) ที่จะเพิ่มไปยังค่า datetimezone ถัดไป |

## เคสการใช้งาน

### สร้าง Timeline สำหรับเหตุการณ์ทั่วโลก

ใช้สำหรับสร้าง List ของเวลาที่เกิดขึ้นใน Time Zone ต่างๆ เพื่อการวิเคราะห์เหตุการณ์ที่เกิดขึ้นพร้อมกันทั่วโลก

### จำลองข้อมูล Time Series

สร้าง List ของ datetimezone เพื่อจำลองข้อมูลอนุกรมเวลาสำหรับทดสอบโมเดลที่ละเอียดอ่อนต่อ Time Zone

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: สร้าง List ของ Datetimezone ทุก 1 นาที

```excel
List.DateTimeZones(#datetimezone(2011, 12, 31, 23, 55, 0, -8, 0), 10, #duration(0, 0, 1, 0))
```

**ผลลัพธ์:** `{ #datetimezone(2011, 12, 31, 23, 55, 0, -8, 0), ..., #datetimezone(2012, 1, 1, 0, 4, 0, -8, 0) }`

สร้าง List ของค่า datetimezone จำนวน 10 ค่า เริ่มต้นที่ 23:55 น. ของวันที่ 31 ธันวาคม 2011 ใน Time Zone -8 ชั่วโมง โดยเพิ่มขึ้นทีละ 1 นาที

### 2. ตัวอย่างที่ 2: สร้าง List ของ Datetimezone ทุก 1 ชั่วโมง

```excel
List.DateTimeZones(#datetimezone(2023, 1, 1, 0, 0, 0, 7, 0), 5, #duration(0, 1, 0, 0))
```

**ผลลัพธ์:** `{ #datetimezone(2023, 1, 1, 0, 0, 0, 7, 0), ..., #datetimezone(2023, 1, 1, 4, 0, 0, 7, 0) }`

สร้าง List ของค่า datetimezone จำนวน 5 ค่า เริ่มต้นเที่ยงคืนวันที่ 1 มกราคม 2023 ใน Time Zone +7 ชั่วโมง (ประเทศไทย) โดยเพิ่มขึ้นทีละ 1 ชั่วโมง

### 3. ตัวอย่างที่ 3: สร้าง List ของ Datetimezone โดยเพิ่มเป็นวัน

```excel
List.DateTimeZones(#datetimezone(2024, 5, 1, 9, 0, 0, 0, 0), 3, #duration(1, 0, 0, 0))
```

**ผลลัพธ์:** `{ #datetimezone(2024, 5, 1, 9, 0, 0, 0, 0), #datetimezone(2024, 5, 2, 9, 0, 0, 0, 0), #datetimezone(2024, 5, 3, 9, 0, 0, 0, 0) }`

สร้าง List ของค่า datetimezone จำนวน 3 ค่า โดยเพิ่มขึ้นทีละ 1 วัน ซึ่งจะคงเวลาและ Time Zone เดิมไว้

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

**Q: List.DateTimeZones ต่างจาก List.DateTimes อย่างไร?**

List.DateTimeZones สร้าง List ของค่าที่รวมข้อมูล Time Zone เข้าไปด้วย ในขณะที่ List.DateTimes สร้าง List ของค่า datetime ปกติที่ไม่มีข้อมูล Time Zone

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

- [List.Dates – สร้างรายการวันที่](https://www.thepexcel.com/functions/power-query/list-functions/list-dates/)
- [List.DateTimes – สร้าง List ของค่า วันที่และเวลา](https://www.thepexcel.com/functions/power-query/list-functions/list-datetimes/)
- [DateTimeZone.From – แปลงค่าเป็น DateTimeZone](https://www.thepexcel.com/functions/power-query/datetimezone-functions/datetimezone-from/)

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

- [Microsoft Learn: List.DateTimeZones](https://learn.microsoft.com/en-us/powerquery-m/list-datetimezones) _(Official Documentation)_

---

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