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

วิธีแปลงวันที่เป็นสตริงตัวเลขหรือรูปแบบข้อความใน Excel

ในบทช่วยสอนนี้ฉันจะแนะนำวิธีการต่างๆในการแก้ไขกรณีต่างๆเกี่ยวกับการแปลงวันที่เป็นตัวเลขหรือรูปแบบข้อความใน Excel
วันที่ doc เป็นข้อความตัวเลข 1


1. แปลงวันที่เป็นข้อความ

ส่วนนี้แสดงวิธีการแปลงวันที่เป็นข้อความใน Excel

ในการแปลงวันที่เป็นข้อความคุณต้องมีสูตรเดียว

สูตร: = TEXT (วันที่,” date_format”)

อ้างอิง: วันที่: เซลล์ที่มีวันที่ที่คุณต้องการแปลงเป็นข้อความ
รูปแบบวันที่: รูปแบบที่คุณต้องการแสดงหลังจากแปลงวันที่เป็นข้อความ

ในกรณีด้านล่างนี้ฉันจะบอกวิธีใช้สูตรนี้

1.1 แปลงวันที่เป็นข้อความในรูปแบบ mm / dd / yyyy

ตัวอย่างเช่นแปลงวันที่ในเซลล์ A3 เป็น mm / dd / yyyy ใช้สูตร
= ข้อความ (A3, "mm / dd / yyyy")
กด เข้าสู่ สำคัญ
วันที่ doc เป็นข้อความตัวเลข 2

หากคุณต้องการแปลงวันที่ในเซลล์ A8 เป็น dd / mm / yyyy ให้ใช้สูตรนี้
= ข้อความ (A8, "dd / mm / yyyy")
กด เข้าสู่ สำคัญ
วันที่ doc เป็นข้อความตัวเลข 3

1.2 แปลงวันที่เป็นข้อความในรูปแบบ mmddyyyy หรือ ddmmyyyy

หากคุณต้องการแปลงวันที่ในเซลล์ A13 เป็นข้อความ แต่ในรูปแบบ mmddyyyy ให้พิมพ์สูตรนี้
= ข้อความ (A13, "mmddyyyy")
กด เข้าสู่ สำคัญ
วันที่ doc เป็นข้อความตัวเลข 4

หากคุณต้องการแปลงวันที่ในเซลล์ A18 เป็นข้อความในรูปแบบ ddmmyyyy ให้พิมพ์สูตรนี้
= ข้อความ (A18, "ddmmyyyy")
กด เข้าสู่ สำคัญ
วันที่ doc เป็นข้อความตัวเลข 5

1.3 แปลงวันที่เป็นข้อความในรูปแบบอื่น

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

วันที่ (A3) 12/23/2019
สูตร = ข้อความ (A3, "mm-dd-yyyy") = ข้อความ (A3, "mm / dd") = ข้อความ (A3, "dd") = ข้อความ (A3, "d / m / y")
ผล 23-12-2019 23/12 23 23/12/19

ใหม่!
เครื่องมือวันที่

ฟังก์ชันและคุณลักษณะวันที่ใหม่ 16 รายการช่วยแก้ปัญหา 90% เกี่ยวกับการประมวลผลวันที่ใน Excel ให้กับคุณ

◆เพิ่มหรือลบปี / เดือน / วัน / สัปดาห์จนถึงปัจจุบัน คลิกเพื่อดูรายละเอียด.

◆เพิ่มหรือลบวินาที / นาที / ชั่วโมงเป็นวันที่ คลิกเพื่อดูข้อมูลเพิ่มเติม.

◆นับวันหยุดสุดสัปดาห์ / วันธรรมดาระหว่างสองวัน คลิกเพื่อดูข้อมูลเพิ่มเติม.

◆ลบเวลาออกจากวันที่ คลิกเพื่อดูรายละเอียด.

◆แปลงเวลาเป็นวินาทีทศนิยม / munites / ชั่วโมง คลิกเพื่อดูรายละเอียด.

◆แปลงรูปแบบวันที่หลายรูปแบบเป็นรูปแบบวันที่มาตรฐานของสหรัฐอเมริกา คลิกเพื่อดูรายละเอียด.

ทดลองใช้ฟรี 30 วันพร้อมคุณสมบัติเต็มรูปแบบ, คืนเงิน 30 วันโดยไม่มีเหตุผล


2. แปลงวันที่เป็นตัวเลข

ในส่วนนี้ฉันให้วิธีการแปลงวันที่เป็นตัวเลขในรูปแบบ mmddyyyy 5 หลัก

2.1 แปลงวันที่เป็นตัวเลขในรูปแบบ 5 หลัก

หากคุณต้องการแปลงวันที่เป็นตัวเลขในรูปแบบ 5 หลักให้ทำดังต่อไปนี้:

1. คลิกขวาที่เซลล์ซึ่งมีวันที่ที่คุณต้องการแปลงเป็นตัวเลขและในเมนูคลิกขวาให้เลือก จัดรูปแบบเซลล์ ร่วมกัน
วันที่ doc เป็นข้อความตัวเลข 6

2 ใน จัดรูปแบบเซลล์ โต้ตอบ, ภายใต้ จำนวน แท็บ, เลือก General จากบานหน้าต่างของ หมวดหมู่.
วันที่ doc เป็นข้อความตัวเลข 7

3 คลิก OK. วันที่ในเซลล์ที่เลือกถูกแปลงเป็นสตริงตัวเลขในรูปแบบ mmddyyyy
วันที่ doc เป็นข้อความตัวเลข 8

2.2 แปลงวันที่เป็นตัวเลขในรูปแบบ mmddyyyy หรือ ddmmyyyy

หากคุณต้องการแปลงวันที่เป็นสตริงตัวเลขในรูปแบบ mmddyyyy หรือ ddmmyyyy คุณยังสามารถใช้ฟังก์ชัน Format Cells ได้

1. คลิกขวาที่เซลล์ซึ่งมีวันที่ที่คุณต้องการแปลงเป็นตัวเลขและในเมนูคลิกขวาให้เลือก จัดรูปแบบเซลล์ ร่วมกัน

2 ใน จัดรูปแบบเซลล์ ไดอะล็อกภายใต้ จำนวน เลือก ประเพณี จาก หมวดหมู่ บานหน้าต่างจากนั้นไปที่ส่วนด้านขวาป้อน อืมมม เข้าไปใน ชนิดภาพเขียน กล่องข้อความ.
วันที่ doc เป็นข้อความตัวเลข 9

3 คลิก OK. วันที่ในเซลล์ที่เลือกถูกแปลงเป็นสตริงตัวเลขในรูปแบบ mmddyyyy
วันที่ doc เป็นข้อความตัวเลข 10

หากคุณต้องการแปลงวันที่เป็นสตริงตัวเลขในรูปแบบอื่นคุณสามารถใช้รายการด้านล่างนี้เป็นข้อมูลอ้างอิงได้

วันที่ 2/23/2019
จัดรูปแบบเซลล์ตามแบบกำหนดเอง ค่ะ ดีมี่ myyyy ปปปปปปปปปปปปปปป
แสดง 23022019 230219 022019 20190223

3. แปลงวันที่เป็นเดือน / วัน / ปีหรือรูปแบบวันที่อื่น ๆ ด้วยการคลิก

หากคุณต้องการแปลงวันที่เป็นเดือนวันปีหรือรูปแบบวันที่อื่น ๆ อย่างรวดเร็วไฟล์ ใช้การจัดรูปแบบวันที่ ประโยชน์ของ Kutools สำหรับ Excel จะเป็นทางเลือกที่ดีในการใช้งาน

บอกลามือเมาส์และกระดูกคอได้เลย

300 เครื่องมือขั้นสูงของ Kutools for Excel แก้ปัญหา ลด 80% งาน Excel ในไม่กี่วินาที ดึงคุณออกจากการคลิกเมาส์นับพัน

จัดการกับสถานการณ์การทำงานกว่า 1500 สถานการณ์ได้อย่างง่ายดาย ไม่ต้องเสียเวลาค้นหาวิธีแก้ปัญหา มีเวลามากพอที่จะสนุกกับชีวิตของคุณ

ปรับปรุงประสิทธิภาพการทำงาน 80% ให้กับผู้คนที่มีประสิทธิภาพสูงกว่า 110000 คนทุกวัน รวมถึงคุณด้วย

ไม่ต้องทรมานกับสูตรเจ็บปวดและ VBA อีกต่อไปให้สมองของคุณได้พักผ่อนและมีอารมณ์ในการทำงานที่สนุกสนาน

ทดลองใช้งานฟรี 30 วันพร้อมฟีเจอร์ครบครัน คืนเงิน 30 วันโดยไม่มีเหตุผล

ร่างกายที่ดีขึ้นสร้างชีวิตที่ดีขึ้น

หลังจาก ฟรีติดตั้ง Kutools for Excelโปรดดำเนินการดังนี้:

1. เลือกเซลล์ที่มีวันที่ที่คุณต้องการแปลงเป็นรูปแบบวันที่อื่น

2 คลิก Kutools > รูปแบบ > ใช้การจัดรูปแบบวันที่.
วันที่ doc เป็นข้อความตัวเลข 11

3 ใน ใช้การจัดรูปแบบวันที่ ให้เลือกรูปแบบวันที่ที่คุณต้องการใช้ การจัดรูปแบบวันที่ ในขณะเดียวกันบานหน้าต่างผลลัพธ์ที่แปลงแล้วจะแสดงตัวอย่างทางด้านขวา ดูตัวอย่าง บานหน้าต่าง
วันที่ doc เป็นข้อความตัวเลข 12

4 คลิก Okจากนั้นวันที่ที่คุณเลือกจะถูกแปลงเป็นรูปแบบวันที่ที่คุณเลือก
วันที่ doc เป็นข้อความตัวเลข 13

แปลงวันที่เป็นการจัดรูปแบบวันที่ของแต่ละบุคคลด้วยการคลิก

ใช้การจัดรูปแบบวันที่

เคล็ดลับเพิ่มเติมเกี่ยวกับการแปลงวันที่


ดาวน์โหลดไฟล์ตัวอย่าง

ตัวอย่าง


เครื่องมือเพิ่มประสิทธิภาพที่แนะนำ

แท็บ Office - การเรียกดูแบบแท็บการแก้ไขการจัดการเอกสารใน Microsoft Office 2019-2003 และ Office 365


แท็บสำนักงาน

Kutools for Excel - รวมฟังก์ชันและเครื่องมือขั้นสูงมากกว่า 300 รายการสำหรับ Microsoft Excel


แท็บ kutools
แท็บ kutoolsp
Comments (40)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I would very much appreciate your help with this formula.How can I switch month, date ,year “030624”in to a number 306042 and put the number in sequential order after the number 306042 like: 3060421
This comment was minimized by the moderator on the site
Hi, I would very much appreciate your help with this formula.How can I switch month, date ,year “030624”in to a number 306042 and put the number in sequential order after the number 306042 like: 3060421
This comment was minimized by the moderator on the site
Hello, how i convert 13.09.2023 to 13.9 my numbers change into dates
This comment was minimized by the moderator on the site
I want to know how many times I went to check the inspection. which I recorded by days.
This comment was minimized by the moderator on the site
Hello. I would very much appreciate your help with this formula. I am wishing to enter the customer's date of birth in cell I3 (custom formatting mm/dd/yy) and would like that date of birth to automatically populate in A3 cell as mmddyy along with adding the First letter from First name cell F3 and First letter from Last name cell G3 in order to have it auto-populate an ID# for our customers in our database.

A3 F3 G3 I3
ID# First Name Last Name Date of Birth
030199AS Adam Smith 03/01/1999

Thank you so much for any help. You have no idea how much I appreciate it. I have been wracking my brain all night to no avail. :(
Shena Bruno
This comment was minimized by the moderator on the site
Hi, Shena, Bruno, in A3, please use the formula =TEXT(I3, mmddyyyy")&LEFT(F3,1)&LEFT(G3,1).
In the formula, it can be explained as two parts:
TEXT(I3, mmddyyyy") will change the value in I3 to this format mmddyyyy
LEFT(F3,1)&LEFT(G3,1) will extract the first character from left side of the strings in cell F3 and G3.
Hope it is helpful.
This comment was minimized by the moderator on the site
I want to convert the day (Tuesday) which is showing up as 1/3/1900 when you click on it because I added a formula on the original data to provide me with Day values. Now I want to use a pivot table to show me the actual days. How do I convert the 1/3/1900 which shows up at Tuesday to just Tuesday? 
This comment was minimized by the moderator on the site
Hi, Cathey, do you want to convert the formula to an actual value? If so, you can use the Paste as Value Only feature in Excel to copy and paste the formulas as values only, or you can use Kutools for Excel's To Actual feature to convert formulas to values.
This comment was minimized by the moderator on the site
Hi, I was trying to copy and past the value but its still showing the date as opposed to the day. 
This comment was minimized by the moderator on the site
Hi, Cathey, do you choose the Paste as Value option in right-click context menu? If you have choosed, try to press Ctrl +1 keys to enable format cells feature and change the cell format to mm/dd/yyyy in Date section.
This comment was minimized by the moderator on the site
Hello. I have the date 26.01.2021 in the cell A1 and in another cell I have the formula: =RIGHT(A1,4) to take the year from that date, and it returns “4526” instead of “2021”. Do you know how to solve it? Thank you very much!
This comment was minimized by the moderator on the site
try to change the format on cell A1 to general or number and then enter the values that you want again to see if it helps. I think your problem is the format issue.
This comment was minimized by the moderator on the site
Hi, I want to convert month to number. For exp: 8 months (date format) ---> "8" as a number or value. I've change its format but I can't count it.Because I want to put it to math format, for exp: 8-2 = 6 (8 from the months). But the 8 doesn't work.Hope you get it. Thank you for helping!
This comment was minimized by the moderator on the site
Hi i have a date in "13/02/2020 11:42:09" format and i want in MM/DD/YYYY format
This comment was minimized by the moderator on the site
Hi, just select the cell then apply the Text to Columns, in the Text to Columns, choose Delimiter > Space > Date(in the Date format, choose DMY) > Finish.
This comment was minimized by the moderator on the site
There is another way, it returns exactly the numeric format that represents the date abbreviated by (/), it would be: '=Substitute(A1;"/";"")
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