Data Import & Export

How to Convert Continuous Numbers into Excel Dates

Olivia MillerOlivia Miller Oct 16, 2026 873 views

Question details

The user needs a method to accurately convert unbroken number strings (like 1032017) into standardized date formats.

How to Convert Continuous Numbers into Excel Dates
Product
Spreadsheet
Device & OS
not provided
Scenario
Importing or processing raw data where dates are exported or typed as continuous numbers without standard delimiters like slashes or hyphens.
Observed behavior
Applying standard date formatting to these raw numbers fails to display the correct date, rendering the data impossible to sort or filter chronologically.
Before you start

Verify the exact digit structure of your continuous numbers (e.g., MMDDYYYY) to ensure the conversion formula accurately extracts the correct month, day, and year components.

Solution 1Recommended

Use a Text Extraction Formula with the DATE Function

Extract the year, month, and day components from the continuous string and combine them into a valid date using a helper formula.

This method uses the RIGHT, LEFT, MID, and LEN functions to intelligently split 7-digit (e.g., 1032017) or 8-digit strings into their respective M, D, and Y components so Excel can recognize them as actual serial dates.

1
Select a helper cell

Click a blank cell next to your first continuous number (e.g., select cell B2 if your raw data is in A2).

2
Enter the parsing formula

Type the formula: =DATE(RIGHT(A2,4),IF(LEN(A2)=7,LEFT(A2,1),LEFT(A2,2)),IF(LEN(A2)=7,MID(A2,2,2),MID(A2,3,2))) and press Enter.

3
Fill the formula down

Click and drag the fill handle (the small square at the bottom-right corner of the cell) downwards to apply the formula to the rest of your data column.

4
Apply date formatting

Select the newly calculated cells, right-click, and choose 'Format Cells'. Under the 'Number' tab, select 'Date' and pick your preferred format (such as YYYY-MM-DD).

Use a Text Extraction Formula with the DATE Function
Tip for Sorting: Using the ISO format (YYYY-MM-DD) is highly recommended for unambiguous chronological sorting and seamless data exchange between different software.
Advanced Data Formatting

Easily Parse and Format Data Strings with WPS Spreadsheet

You can effortlessly convert, format, and organize complex unbroken data strings using the powerful formulas and built-in Data tools in WPS Spreadsheet.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the file containing the continuous numbers.
  2. 2. Apply the conversion formula: Use the =DATE() text extraction formula in an adjacent blank column to instantly assemble the date components.
  3. 3. Standardize the format: Right-click the results, open the 'Format Cells' dialog, and set your preferred ISO date format (YYYY-MM-DD) for accurate sorting.
100% compatible with Microsoft Excel formulas, date formatting, and data parsing tools.Built-in Text to Columns wizard for quick and formula-free data transformation.Lightweight, fast, and runs smoothly on Windows, Mac, and Linux systems.Free to use for everyday data management and complex analytical tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't changing the cell format to 'Date' work directly on 1032017?

Spreadsheet software treats standard dates as sequential serial numbers starting from January 1, 1900. The number 1032017 represents a date incredibly far into the future (well beyond standard limits), so standard formatting cannot interpret it properly without the string being parsed into month, day, and year components first.

How does the formula handle both 7-digit and 8-digit numbers?

The recommended formula incorporates the LEN() function, which counts the total number of characters in the cell. If the length is 7 (e.g., 1032017), it knows the month is a single digit (1 for January) and extracts accordingly. If the length is 8 (e.g., 11032017), it adjusts to extract two digits for the month.

How do I remove the formulas after converting the numbers into dates?

Select the cells containing the newly calculated dates, copy them (Ctrl+C), right-click the same selection, and choose 'Paste as Values'. This removes the underlying formulas while keeping the actual date data intact, allowing you to delete the original raw numbers column.