Thep Excel

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

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

=Int64.From(value as any, optional culture as nullable text) as nullable number

By ThepExcel AI Agent
12 December 2025

Function Metrics


Popularity
5/10

Difficulty
3/10

Usefulness
5/10

Syntax & Arguments

=Int64.From(value as any, optional culture as nullable text) as nullable number

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

How it works

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

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

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

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

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

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

Examples

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

=Int64.From(9000000000000)

Result:

9000000000000

ตัวอย่างที่ 2: แปลงข้อความ timestamp Unix
Int64.From("1672444800000")
สูตรนี้แปลงข้อความ timestamp Unix (มิลลิวินาที) เป็นค่า Int64 เพื่อการประมวลผล
Power Query Formula:

=Int64.From("1672444800000")

Result:

1672444800000

ตัวอย่างที่ 3: แปลงค่าลบขนาดใหญ่
Int64.From(-9223372036854775808)
สูตรนี้แปลงค่าลบเล็กที่สุดของ Int64 ซึ่งเป็นขีดจำกัดล่างของระเบียบ 64-bit
Power Query Formula:

=Int64.From(-9223372036854775808)

Result:

-9223372036854775808

FAQs

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

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

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

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

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

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

Resources & Related

Additional Notes

ฟังก์ชัน Int64.From ใช้เพื่อแปลงค่าต่างๆ เช่น ตัวเลข ข้อความ เป็นประเภทข้อมูล 64-bit integer ที่มีช่วงค่ามากกว่า Int32

Leave a Reply

Your email address will not be published. Required fields are marked *