---
title: Int64.From – แปลงค่าเป็น 64-bit integer
url: https://www.thepexcel.com/functions/power-query/number-functions/int64-from/
type: function-explainer
program: Power Query
syntax: "Int64.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
---

# Int64.From – แปลงค่าเป็น 64-bit integer

> แปลงค่าเป็น 64-bit integer

## คำอธิบาย

Int64.From แปลงค่าต่างๆ เช่น ตัวเลข (number) ข้อความ (text) เป็นประเภทข้อมูล Int64 ซึ่งเป็นจำนวนเต็ม 64-bit ที่มีช่วงค่าตั้งแต่ -9223372036854775808 ถึง 9223372036854775807 ใช้สำหรับตัวเลขที่ใหญ่เกินไปสำหรับ Int32 เช่น timestamp ตัวเลข ID ขนาดใหญ่

## Syntax

```excel
Int64.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) สำหรับการแปลงข้อความ |

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

### ประมวลผล timestamp ขนาดใหญ่

แปลงค่า timestamp Unix ที่มีขนาดใหญ่เป็น Int64

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

### เชื่อมต่อกับระบบที่ต้อง 64-bit ID

แปลงข้อมูล ID ขนาดใหญ่สำหรับระบบที่ต้อง Int64

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

### การคำนวณตัวเลขขนาดใหญ่

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

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

## ตัวอย่าง

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

```excel
Int64.From(9000000000000)
```

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

สูตรนี้แปลงค่า 9000000000000 (9 ล้านล้าน) เป็นประเภท Int64 ตัวเลขนี้เกินขีดจำกัด Int32 แต่อยู่ในช่วง Int64

### 2. ตัวอย่างที่ 2: แปลงข้อความ timestamp Unix

```excel
Int64.From("1672444800000")
```

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

สูตรนี้แปลงข้อความ timestamp Unix (มิลลิวินาที) เป็นค่า Int64 เพื่อการประมวลผล

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

```excel
Int64.From(-9223372036854775808)
```

**ผลลัพธ์:** `-9223372036854775808`

สูตรนี้แปลงค่าลบเล็กที่สุดของ Int64 ซึ่งเป็นขีดจำกัดล่างของระเบียบ 64-bit

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

⚠️ ฟังก์ชัน Int64.From มีข้อจำกัดของช่วงค่า -9223372036854775808 ถึง 9223372036854775807 ตัวเลขนอกช่วงนี้จะทำให้เกิดข้อผิดพลาด ใช้ Int64.From สำหรับ timestamp และ ID ขนาดใหญ่

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

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

Int32.From มีช่วง -2.1 พันล้าน ถึง 2.1 พันล้าน ส่วน Int64.From มีช่วงมากกว่ามากหลายเท่า (-9.2 ล้านล้าน ถึง 9.2 ล้านล้าน) ใช้ Int64.From เมื่อต้องตัวเลขขนาดใหญ่

**Q: สามารถแปลงตัวเลขทศนิยมได้หรือไม่**

ได้แต่จะปัดเศษเป็นจำนวนเต็ม เช่น 1000.9 จะแปลงเป็น 1001

**Q: ใช้เมื่อไหร่ควรใช้ Int64 แทน Number**

ใช้ Int64 เมื่อต้องจำนวนเต็มขนาดใหญ่ ใช้ Number เมื่อต้องตัวเลข floating-point

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

- [Int32.From – แปลงค่าเป็น 32-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int32-from/)
- [Int8.From – แปลงค่าเป็น 8-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int8-from/)
- [Int16.From – แปลงค่าเป็น 16-bit integer](https://www.thepexcel.com/functions/power-query/number-functions/int16-from/)
- [Number.From – แปลงค่าเป็นตัวเลข](https://www.thepexcel.com/functions/power-query/number-functions/number-from/)

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

- [Microsoft Learn: Int64.From](https://learn.microsoft.com/en-us/powerquery-m/int64-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/int64-from/](https://www.thepexcel.com/functions/power-query/number-functions/int64-from/)_
