---
title: DateTimeZone.SwitchZone – เปลี่ยน Timezone
url: https://www.thepexcel.com/functions/power-query/datetimezone-functions/datetimezone-switchzone/
type: function-explainer
program: Power Query
syntax: "DateTimeZone.SwitchZone(dateTimeZone as nullable datetimezone, timezoneHours as number, optional timezoneMinutes as nullable number) as nullable datetimezone"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 4
  difficulty: 4
  usefulness: 4
---

# DateTimeZone.SwitchZone – เปลี่ยน Timezone

> เปลี่ยน Timezone

## คำอธิบาย

เปลี่ยน Timezone ของข้อมูล (ปรับเวลาตาม Zone ใหม่)

## Syntax

```excel
DateTimeZone.SwitchZone(dateTimeZone as nullable datetimezone, timezoneHours as number, optional timezoneMinutes as nullable number) as nullable datetimezone
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| dateTimeZone | Yes | datetimezone |  | ค่า DateTimeZone เดิม |
| timezoneHours | Yes | number |  | ชั่วโมง Offset ใหม่ |
| timezoneMinutes | No | number |  | นาที Offset ใหม่ |

## ตัวอย่าง

### 1. เปลี่ยนเป็น UTC

```excel
DateTimeZone.SwitchZone(#datetimezone(2025, 1, 1, 12, 0, 0, 7, 0), 0)
```

**ผลลัพธ์:** `2025-01-01T05:00:00+00:00`

เปลี่ยนจาก +7 เป็น +0 (เวลาจะลดลง 7 ชั่วโมง)

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

- [DateTimeZone.RemoveZone – ลบ Timezone ออก](https://www.thepexcel.com/functions/power-query/datetimezone-functions/datetimezone-removezone/)
- datetimezone-to-local

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

- [PowerQuery.how](https://powerquery.how/datetimezone-switchzone/) _(guide)_

---

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