52.0k views
2 votes
How to convert 8-digit number to date in excel

User Zbess
by
7.5k points

1 Answer

3 votes

Final answer:

To convert an 8-digit number to a date in Excel, use the DATE function combined with the LEFT, MID, and RIGHT functions to extract the year, month, and day parts of the number and then combine them into a recognized date format.

Step-by-step explanation:

To convert an 8-digit number to a date in Excel, you can use the DATE function, which is built into Excel. The 8-digit number typically represents a date in the format YYYYMMDD. For example, 20210304 would represent March 4, 2021. To convert this number into a date, you would use a formula like the following: =DATE(LEFT(A1,4), MID(A1,5,2), RIGHT(A1,2))

This formula breaks down in the following way: LEFT(A1,4) extracts the first four digits, which represent the year. MID(A1,5,2) extracts the two digits starting from the fifth character, which represent the month. RIGHT(A1,2) extracts the last two digits, which represent the day. After extracting the year, month, and day, the DATE function combines them into a date that Excel can recognize.

User Frayda
by
7.3k points