How to Convert numbers and texts into date formats in Excel

Source: Internet
Author: User

1. First read the content of the excel sheet I prepared

2. Now we want to convert text numbers like 19900909 to formats like

3. We can see from the table that all our characters are 8 characters in length. Therefore, we can conclude that the first four digits are the year of birth, the middle part is the month, and the end part is the day, so we can use the Left (), Right (), and mid () functions in excel. Our idea is to divide the original string into three sections and then connect them, add "-" in the middle.

4. Get the year, month, and day from the 8-digit number.

5. Connect them to get the DATE. Use the DATE () function.

6. After half a day, we only need a formula like DATE (Left (A2, 4), MID (A2, 5, 2), Right (A2, 2 ))

7. Finally, we refer to the cell with a formula. When it turns into a plus sign, we can drag it down.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.