---
title: DateTimeZone.ToLocal – แปลงเป็น Local Time
url: https://www.thepexcel.com/functions/power-query/datetimezone-functions/datetimezone-tolocal/
type: function-explainer
program: Power Query
syntax: DateTimeZone.ToLocal(dateTimeZone as nullable datetimezone) as nullable datetimezone
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# DateTimeZone.ToLocal – แปลงเป็น Local Time

> แปลงเป็น Local Time

## คำอธิบาย

แปลงค่า DateTimeZone ไปเป็น Local Time ของเครื่องที่รัน Query

## Syntax

```excel
DateTimeZone.ToLocal(dateTimeZone as nullable datetimezone) as nullable datetimezone
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| dateTimeZone | Yes | datetimezone |  | ค่า DateTimeZone ต้นทาง |

## ตัวอย่าง

### 1. แปลงเป็นเวลาเครื่อง

```excel
DateTimeZone.ToLocal(DateTimeZone.UtcNow())
```

**ผลลัพธ์:** `เวลา Local (+07:00)`

เปลี่ยนจาก UTC เป็นเวลาท้องถิ่น

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

- [DateTimeZone.ToUtc – แปลงเป็น UTC](https://www.thepexcel.com/functions/power-query/datetimezone-functions/datetimezone-toutc/)
- [DateTimeZone.SwitchZone – เปลี่ยน Timezone](https://www.thepexcel.com/functions/power-query/datetimezone-functions/datetimezone-switchzone/)

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

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

---

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