ไปยังเนื้อหาหลัก

วิธีการแปลงระหว่างวันที่และการประทับเวลา Unix ใน Excel

การประทับเวลา Unix เรียกอีกอย่างว่าเวลา Epoch หรือเวลา POSIX ซึ่งใช้กันอย่างแพร่หลายในระบบปฏิบัติการหรือรูปแบบไฟล์จำนวนมาก บทช่วยสอนนี้พูดถึงการแปลงระหว่างวันที่และการประทับเวลา Unix ใน Excel

แปลงวันที่เป็นการประทับเวลา

แปลงวันที่และเวลาเป็นการประทับเวลา

แปลงเวลาประทับเป็นวันที่

บทช่วยสอนเพิ่มเติมเกี่ยวกับการแปลงวันที่และเวลา ...


ลูกศรสีฟ้าฟองขวา แปลงวันที่เป็นการประทับเวลา

ในการแปลงวันที่เป็นการประทับเวลาสูตรสามารถใช้งานได้

เลือกเซลล์ว่างสมมติว่าเซลล์ C2 แล้วพิมพ์สูตรนี้ = (C2-DATE (1970,1,1)) * 86400 เข้าไปแล้วกด เข้าสู่ ถ้าคุณต้องการคุณสามารถใช้ช่วงกับสูตรนี้ได้โดยลากที่จับการป้อนอัตโนมัติ ขณะนี้ช่วงของเซลล์วันที่ได้ถูกแปลงเป็นการประทับเวลา Unix แล้ว
doc-แปลงวันที่-unix-1


2 คลิกเพื่อแปลงเวลาเป็นชั่วโมงทศนิยม นาที หรือวินาที

พื้นที่ แปลงเวลา คุณลักษณะของ Kutools สำหรับ Excel สามารถช่วยให้คุณแปลงเวลาเป็นชั่วโมงทศนิยม นาที หรือวินาทีได้อย่างรวดเร็ว และวางผลลัพธ์ในปลายทางเดิมหรือปลายทางอื่น

เวลาแปลงเอกสาร 1

ลูกศรสีฟ้าฟองขวา แปลงวันที่และเวลาเป็นการประทับเวลา

มีสูตรที่สามารถช่วยคุณแปลงวันที่และเวลาเป็น Unix timestamp

1. ประการแรกคุณต้องพิมพ์เวลาสากลเชิงพิกัดลงในเซลล์ 1/1/1970 ดูภาพหน้าจอ:
doc-แปลงวันที่-unix-2

2. จากนั้นพิมพ์สูตรนี้ = (A1- $ C $ 1) * 86400 ลงในเซลล์กด เข้าสู่ จากนั้นหากคุณต้องการให้ลากที่จับการป้อนอัตโนมัติไปยังช่วงด้วยสูตรนี้ ดูภาพหน้าจอ:
doc-แปลงวันที่-unix-3

เคล็ดลับ: ในสูตร A1 คือเซลล์วันที่และเวลา C1 คือเวลาสากลของพิกัดที่คุณพิมพ์


ลูกศรสีฟ้าฟองขวา แปลงเวลาประทับเป็นวันที่

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

1. ในเซลล์ว่างถัดจากรายการเวลาประทับของคุณแล้วพิมพ์สูตรนี้ =(((A1/60)/60)/24)+DATE(1970,1,1)กด เข้าสู่ จากนั้นลากที่จับเติมอัตโนมัติไปยังช่วงที่คุณต้องการ
doc-แปลงวันที่-unix-4

2. จากนั้นคลิกขวาที่เซลล์ที่ใช้สูตรแล้วเลือก จัดรูปแบบเซลล์ จากเมนูบริบทจากนั้นใน popping จัดรูปแบบเซลล์ กล่องโต้ตอบภายใต้ Nรอบ คลิกแท็บ วันที่ ใน หมวดหมู่ จากนั้นเลือกประเภทวันที่ในส่วนด้านขวา
doc-แปลงวันที่-unix-5

3 คลิก OKตอนนี้คุณสามารถเห็นการประทับเวลา Unix ได้รับการแปลงเป็นวันที่
doc-แปลงวันที่-unix-6

หมายเหตุ:

1. A1 ระบุเซลล์การประทับเวลาที่คุณต้องการ

2. สูตรนี้ยังสามารถใช้ในการแปลงลำดับเวลาเป็นวันที่และเวลาเพียงจัดรูปแบบผลลัพธ์เป็นรูปแบบวันที่และเวลา

3. สูตรข้างต้นแปลงตัวเลข 10 หลักเป็นวันที่และเวลามาตรฐาน หากต้องการแปลงตัวเลข 11 หลัก หรือตัวเลข 13 หลัก หรือ 16 หลักให้เป็นวันที่และเวลามาตรฐานใน Excel โปรดใช้สูตรดังนี้

แปลงตัวเลข 11 หลักเป็นวันที่: =A1/864000+DATE( 1970,1,1)

แปลงตัวเลข 13 หลักเป็นวันที่: =A1/86400000+DATE( 1970,1,1)

แปลงตัวเลข 16 หลักเป็นวันที่: =A1/86400000000+DATE( 1970,1,1)

สำหรับความยาวต่างๆ ของตัวเลขที่ต้องแปลงเป็นวันที่และเวลา ให้เปลี่ยนจำนวนศูนย์ของตัวหารในสูตรเพื่อให้ได้ผลลัพธ์ที่ถูกต้อง


บทความญาติ:

  • วิธีลบเวลาจากวันที่ใน Excel
    หากมีคอลัมน์ของวันที่ที่มีการประทับเวลาเช่น 2/17/2012 12:23 และคุณไม่ต้องการคงการประทับเวลาไว้และต้องการลบเวลา 12:23 ออกจากวันที่และปล่อยเฉพาะวันที่ 2/17/2012. คุณจะลบเวลาออกจากวันที่ในเซลล์หลายเซลล์ใน Excel ได้อย่างรวดเร็วได้อย่างไร

  • วิธีรวมวันที่และเวลาเป็นเซลล์เดียวใน Excel
    แผ่นงานมีสองคอลัมน์โดยหนึ่งคือวันที่และอีกคอลัมน์คือเวลา มีวิธีใดในการรวมสองคอลัมน์นี้เป็นหนึ่งเดียวอย่างรวดเร็วและคงรูปแบบเวลาไว้ ตอนนี้บทความนี้แนะนำสองวิธีใน Excel ในการรวมคอลัมน์วันที่และคอลัมน์เวลาเข้าด้วยกันและรักษารูปแบบเวลาไว้

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (27)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How Define a Custom Date Format: yyyy-mm-dd hh:mm:ss

yyyy: Year with four digits.
mm: Month with two digits (01-12).
dd: Day of the month with two digits (01-31).
hh: Hour with two digits (00-23).
mm: Minute with two digits (00-59).
ss: Second with two digits (00-59).
This comment was minimized by the moderator on the site
Hi, Monero Jeanniton, to format a cell with custom date format, just right-click on the cell, select Format Cells, then type the format into Type of Custom section. See screenshot:
https://www.extendoffice.com/images/stories/comments/sun-comment/format%20cells.png
This comment was minimized by the moderator on the site
Converted 123000 Lines of Data Stamp 13 Digits like a PRO Thanks alot for the tips
This comment was minimized by the moderator on the site
I have a numeric value of 3721719999 which is suppose to display as 00:06:12 (hh:mm:ss). This time represents the time duration of a video file. The date stamp on the file name is 1/18/2014 4:04 pm, if that offers any further information. I extracted the number using Filelist.exe and this was the result. Thanks!
This comment was minimized by the moderator on the site
How to convert 13 digits timestamp to human readable date ?
Could someone help please
This comment was minimized by the moderator on the site
Hi, Roobanraj, to convert 13 digits timestamp to a standard datetime, you can use the formula as this:=A1/86400000+DATE(1970,1,1), A1 is the cell that contains the 13-digits you want to convert to.
This comment was minimized by the moderator on the site
How to convert 11 digits timestamp to human readable date ?
Could someone help please
This comment was minimized by the moderator on the site
For converting 11 digits timestamp to a standard datetime, use the formula as this:=A1/864000+DATE(1970,1,1), A1 is the cell that contains the 11-digits you want to convert to.
This comment was minimized by the moderator on the site
how to convert event time stamp to hour
This comment was minimized by the moderator on the site
To convert date for MOODLE the only formula that worked was:


Instead of =(C2-DATE(1970,1,1))*86400

I tried 20/october/1980 and Moodle read 19/october/1980.

I used
=(C2-DATE(1970,1,0))*86400

I tried 20/october/1980 and Moodle read 20/october/1980.
This comment was minimized by the moderator on the site
How to convert 21 digits timestamp to human readable date ?
Could someone help please
E.g., 202002191100506253230
This comment was minimized by the moderator on the site
IF you have an LDAP 18-Digit timestamp such as 132079258679926000 the below formulas will not work. You first have to convert them as they are based in nano seconds from 1/1/1601. The following formula in Excel converts the LDAP to EPOCH to human dates =(((((A1/10000000)-11644473900)/60)/60)/24)+DATE(1970,1,1) where A1 refers to your timestamp location
This comment was minimized by the moderator on the site
Thanks for your supplement.
This comment was minimized by the moderator on the site
One thing to note is that the above is for epoch time in seconds. If you need milliseconds, you need to add a further multiplication / division by 1000. For example, converting from epoch time (milliseconds) to a date would be "=((((A1/1000)/60)/60)/24)+DATE(1970,1,1)".
This comment was minimized by the moderator on the site
Muchas gracias, para mi caso estaba adivinando porque no conocía que tipo de dato venia pero este fue la solución, el dato que me pasaron era con esta forma 1641014648299 y la formula fue esta =((((C2/1000)/60)/60)/24 )+FECHA(1970;1;1) por lo cual si alguien esta en un caso similar al mío puede optar por esta formula.

Esta formula también me sirvió pero solo trae fecha =A1/86400000+FECHA(1970;1;1)
This comment was minimized by the moderator on the site
As a side note, the best way to tell if it's seconds or milliseconds is looking at the length of the field; if it's 10 digits, it's seconds, and if it's 13 digits, it's milliseconds. "=LEN(A1)" will tell you how long the value is.
This comment was minimized by the moderator on the site
If that's too much manual work for you (or you have a list that's mixed between seconds and milliseconds), then you can use the following formula to automatically switch between seconds and milliseconds based on the length of the cell: "=((A1/86400)/IF(LEN(A1)=13,1000,1))+DATE(1970,1,1)".
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations