Function Problems

How to Convert 8-Digit Numbers to Date Format in Excel

Olivia MillerOlivia Miller Oct 22, 2026 870 views

Question details

The user needs to convert an 8-digit continuous number string into a standard readable date format with slashes.

How to Convert an 8-Digit Number to a Date Format in Excel
Product
Excel
Device & OS
not provided
Scenario
Organizing or cleaning imported data where dates appear as a continuous string of eight digits without any separators.
Observed behavior
The data is currently displayed as continuous numbers (e.g., 01232023) instead of a recognized date format (e.g., 01/23/2023).
Before you start

Ensure your 8-digit numbers are formatted consistently (e.g., all in MMDDYYYY format) before applying conversion formulas or tools to avoid incorrect date outputs.

Solution 1Recommended

Convert to Date Format Using the MID Formula

Extract and combine the month, day, and year using the MID function to format the string exactly as needed.

The MID function is highly effective for extracting specific characters from a text string. By extracting the month, day, and year separately and concatenating them with a slash separator, you can seamlessly convert continuous numbers into readable dates.

1
Select a target cell

Select a blank cell adjacent to your 8-digit value. For example, if your 8-digit number is in cell A1, select cell B1.

2
Enter the formula

Type the formula =MID(A1,1,2)&"/"&MID(A1,3,2)&"/"&MID(A1,5,4) into the cell and press Enter.

3
Apply to the rest of the column

Click on the cell containing the new formula, hover over the bottom-right corner to find the fill handle, and drag it down to convert the rest of the values in your column.

Convert to Date Format Using the MID Formula
Handling #### Errors: If the formula result displays as '####', the column is too narrow to display the result. Double-click the right boundary of the column header to widen it.
Simplify Data Cleaning

Format Dates Quickly in WPS Spreadsheet

Easily clean up imported data and convert numbers into standard date formats seamlessly using WPS Spreadsheet. It offers full support for data processing tools and is completely compatible with Excel formats.

  1. 1. Open your dataset: Launch WPS Spreadsheet, open your document, and select the column filled with 8-digit numbers.
  2. 2. Use Text to Columns: Go to the Data tab on the top menu and select 'Text to Columns'.
  3. 3. Select Date format: Click 'Next' until you reach the final step, check 'Date', select 'MDY', and click 'Finish' to apply the conversion.
Free and lightweight office suiteFully compatible with Microsoft Excel formulas and date formatsBuilt-in Text to Columns tool for rapid bulk data formattingUser-friendly interface for effortless data cleaning
microsoft office alternative - wps office

Frequently Asked Questions

Why does my date formula return a #VALUE! error?

This usually happens if the referenced cell contains hidden spaces or non-numeric characters. Use the TRIM function around your cell reference, such as =TRIM(A1), to remove extra spaces before applying the MID formula.

Can I convert dates formatted as DDMMYYYY instead?

Yes, you can easily adjust the extraction logic. In the Text to Columns wizard, select 'DMY' instead of 'MDY'. If using the formula, rearrange the MID segments to place the day first, or keep the same formula if you want the final text string to follow the DD/MM/YYYY structure.

How do I change the slashes to dashes (01-23-2023)?

To use dashes instead of slashes, simply replace the slash ("/") with a dash ("-") in your MID formula. The updated formula will look like this: =MID(A1,1,2)&"-"&MID(A1,3,2)&"-"&MID(A1,5,4).