Data Import & Export

How to Convert YYYYMMDD to Date and Numeric Values to Time in Excel

Phi Hung VoPhi Hung Vo Nov 2, 2026 870 views

Question details

The user needs to convert continuous numeric or text strings (such as 20200703 and 2254) into native Excel date and time formats.

How to Convert YYYYMMDD Strings and Numeric Times in Excel
Product
Excel
Device & OS
not provided
Scenario
Importing or pasting external data where dates and times appear as unformatted continuous strings instead of standard Excel date/time serial numbers.
Observed behavior
Dates display as numeric strings (YYYYMMDD) or show hash marks (####) when formatted incorrectly. Time values appear as raw numbers (e.g., 2254) instead of standard time displays (22:54).
Before you start

Ensure your data represents valid dates and times; values that do not correspond to valid dates or are out of bounds may result in error hash marks (####) when formatted.

Solution 1Recommended

Convert YYYYMMDD to Date using Text to Columns

Use the built-in Text to Columns feature to quickly parse 8-digit numeric strings into standard Excel date formats.

This method is the most efficient way to convert an entire column of YYYYMMDD strings into actual date serial numbers without using complex formulas.

1
Select the data column

Click the column header (e.g., Column F) or highlight the specific cells containing the YYYYMMDD strings.

2
Open Text to Columns

Go to the 'Data' tab on the Excel ribbon and click the 'Text to Columns' button.

3
Navigate the Wizard

Leave the data type as 'Delimited', click 'Next', and leave all delimiter checkboxes unchecked in step 2. Click 'Next' again to proceed to step 3.

4
Apply Date formatting

In the 'Column data format' section, select the 'Date' radio button. Click the adjacent dropdown menu and choose 'YMD'.

5
Finish the conversion

Click 'Finish'. Your text strings will instantly convert into native Excel date formats.

Convert YYYYMMDD to Date using Text to Columns
Immediate Formatting: Once converted, you can apply any standard Excel date format (like DD/MM/YYYY or spelling out the month) using the Format Cells dialog (Ctrl+1).
Effortless Data Processing

Convert Dates and Times Seamlessly with WPS Spreadsheet

Handle imported data, convert YYYYMMDD formats, and apply complex TIME formulas effortlessly in WPS Office. It provides a robust, user-friendly interface that natively supports all advanced data parsing functions.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open the document containing your unformatted dates or numeric time strings.
  2. 2. Use Text to Columns: Highlight the YYYYMMDD column, navigate to the Data tab, and select 'Text to Columns'.
  3. 3. Select YMD Date format: Follow the wizard to step 3, select 'Date', choose 'YMD' from the dropdown, and click Finish for instant conversion.
Fully compatible with Microsoft Excel (.xlsx) formats and formulasSupports the Text to Columns feature for instant data conversionIncludes all standard time and math functions like TIME, MOD, and TimeSerial in VBALightweight architecture ensures fast processing of large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why do I see hash marks (####) after converting my dates?

Hash marks typically appear if the converted date is invalid, if it results in a negative date value, or simply if the column is too narrow to display the formatted date. Try double-clicking the column header border to auto-fit the width first.

Can I format YYYYMMDD as a date using a formula instead of Text to Columns?

Yes, you can use the DATE function combined with text extraction functions. For a value in cell A1, use the formula =DATE(LEFT(A1,4), MID(A1,5,2), RIGHT(A1,2)) to extract and combine the year, month, and day.

How does the formula =TIME(N3/100,MOD(N3,100),0) extract hours and minutes?

The TIME function requires three arguments: hours, minutes, and seconds. Dividing 2254 by 100 yields 22.54; Excel ignores the decimal for the hours argument, effectively using 22. The MOD function, MOD(2254,100), extracts the remainder of the division, which is exactly 54, providing the minutes.