---
title: Double.From – แปลงค่าเป็น double
url: https://www.thepexcel.com/functions/power-query/number-functions/double-from/
type: function-explainer
program: Power Query
syntax: "Double.From(value as any, optional culture as nullable text) as nullable number"
date: 2025-12-12
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Double.From – แปลงค่าเป็น double

> แปลงค่าต่างๆ เป็น double

## คำอธิบาย

Double.From แปลงค่าต่างๆ เช่น ตัวเลข (number) ข้อความ (text) เป็นประเภทข้อมูล double ประเภท double เป็นตัวเลข floating-point ที่มีความเที่ยงตรงสูงกว่า single ใช้สำหรับการคำนวณทางวิทยาศาสตร์ การวิเคราะห์ข้อมูล และการประมวลผลตัวเลขที่มีขนาดใหญ่

## Syntax

```excel
Double.From(value as any, optional culture as nullable text) as nullable number
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| value | Yes | any |  | ค่าที่ต้องการแปลง (number, text ฯลฯ) |
| culture | No | text | null | สำนัก (culture) สำหรับการแปลงข้อความ |

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

### การคำนวณทางวิทยาศาสตร์

ใช้สำหรับการคำนวณที่ต้องความแม่นยำและอาจมีตัวเลขมีขนาดใหญ่

_เหมาะกับ:_ scientific-calculation

### วิเคราะห์ข้อมูลทางสถิติ

แปลงข้อมูลเพื่อการวิเคราะห์ทางสถิติและวิทยาศาสตร์ข้อมูล

_เหมาะกับ:_ statistical-analysis

### ประมวลผลตัวเลขที่มีขนาดใหญ่

ใช้สำหรับตัวเลขที่มีค่ามากหรือเล็กมาก

_เหมาะกับ:_ large-number-processing

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: แปลงตัวเลข 3.14159 เป็น double

```excel
Double.From(3.14159)
```

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

สูตรนี้แปลงค่า 3.14159 เป็นประเภท double โดยรักษาความเที่ยงตรงของตัวเลขทั้งหมด

### 2. ตัวอย่างที่ 2: แปลงข้อความ "1.23e+10" เป็น double

```excel
Double.From("1.23e+10")
```

**ผลลัพธ์:** `1.23e+10`

สูตรนี้แปลงข้อความในรูปแบบสัญกรณ์วิทยาศาสตร์เป็นค่า double 12300000000

### 3. ตัวอย่างที่ 3: แปลงตัวเลขขนาดใหญ่

```excel
Double.From(9999999999.999)
```

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

สูตรนี้แปลงตัวเลขขนาดใหญ่เป็น double ซึ่งสามารถจัดการตัวเลขที่มีขนาดใหญ่และเล็กได้

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

⚠️ ฟังก์ชัน Double.From ใช้สำหรับการคำนวณวิทยาศาสตร์และตัวเลขที่มีขนาดใหญ่มาก สำหรับการเงิน ให้ใช้ Decimal.From แทน Double ใช้ IEEE 754 double-precision floating-point format

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

**Q: ความแตกต่างระหว่าง Double.From กับ Decimal.From**

Double.From ใช้สำหรับการคำนวณทางวิทยาศาสตร์ Decimal.From ใช้สำหรับการเงิน Double มีขนาดใหญ่กว่า Decimal แต่อาจสูญเสียความแม่นยำบางส่วน

**Q: สามารถแปลงค่า infinity ได้หรือไม่**

ได้ ตัวอักษร "Infinity", "+Infinity", "-Infinity" จะแปลงเป็นค่า infinity ของ double

**Q: ถ้าแปลงจากข้อความที่ไม่ใช่ตัวเลขจะเป็นยังไง**

ฟังก์ชันจะส่งคืนข้อผิดพลาด หรือ null ขึ้นอยู่กับการจัดการข้อผิดพลาด

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

- [Number.From – แปลงค่าเป็นตัวเลข](https://www.thepexcel.com/functions/power-query/number-functions/number-from/)
- [Decimal.From – แปลงค่าเป็น decimal](https://www.thepexcel.com/functions/power-query/number-functions/decimal-from/)
- [Single.From – Single From](https://www.thepexcel.com/functions/power-query/number-functions/single-from/)
- [Int64.From – แปลงค่าเป็น 64-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int64-from/)

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

- [Microsoft Learn: Double.From](https://learn.microsoft.com/en-us/powerquery-m/double-from) _(documentation)_
- [Power Query M Function Reference](https://learn.microsoft.com/en-us/powerquery-m/power-query-m-function-reference) _(documentation)_

---

_Source: [https://www.thepexcel.com/functions/power-query/number-functions/double-from/](https://www.thepexcel.com/functions/power-query/number-functions/double-from/)_
