How to convert text to date in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Text stored as a date is a string that looks like a date but Excel does not recognize it as a valid date value. Excel treats it as text, and this prevents sorting, filtering, and calculations.
How to convert text to date in Excel
To convert text to date in Excel, use built-in tools or formulas depending on the format of the text.
1. Using the Text to Columns tool
This method works when the text follows a consistent format such as 12/25/2024 or 25-12-2024.
-
Select the cells that contain the text.
-
Go to Data > Text to Columns.
-
Select Delimited and click Next.
-
Leave all delimiters unchecked and click Next.
-
Open Column data format and choose Date.
-
Select the date order that matches your text (MDY, DMY, or YMD).
-
Click Finish.
Windows and Mac share identical steps for this tool.
2. Using the DATEVALUE function
The DATEVALUE function converts a recognized text date to a true Excel date. Excel converts the result into a serial number.
-
Use the formula:
-
Press Enter.
-
Format the result as a date by going to Home > Number Format > Short Date or Long Date.
3. Using formulas for irregular formats
Irregular formats require transforming text into a standard date.
a. Converting “YYYYMMDD”
When the text looks like 20241225, split into year, month, and day.
b. Converting “DD-MM-YYYY” stored as text
Convert separators to a recognizable pattern.
4. Using Power Query
Power Query converts large datasets reliably.
-
Select the range.
-
Go to Data > From Table/Range.
-
In Power Query, select the column.
-
Open Data Type and choose Date.
-
Select Close & Load.
Windows and Mac provide the same Power Query interface.
5. Using VALUE for numeric text
The VALUE function converts numeric text that Excel can interpret as dates.
-
Enter:
-
Format the result as a date.
6. Fixing dates that converted incorrectly
When Excel misinterprets the order (e.g., interpreting 05/06/2024 as June instead of May), convert with a formula specifying each part.
Why text fails to convert
Excel fails to convert text because of one or more of these conditions:
-
The separator is inconsistent (slash, dash, dot, space).
-
The text contains extra spaces.
-
The date uses a format not recognized by the system settings.
-
The entry uses month names misspelled or abbreviated incorrectly.
Trim spaces by using:
How to extract dates from text that includes words
When text includes words such as “Report generated on 12/25/2024”, extract the date with this pattern:
This extracts a 10-character date block like 12/25/2024.
Best practices
-
Standardize date formats before importing data.
-
Use consistent separators in all data sources.
-
Verify converted dates by sorting from oldest to newest.
-
Apply cell formatting only after confirming correct conversion.
If you want, I can show methods tailored to your exact text format.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to remove date format in excel
Answers · 1
What is short date format in excel
Answers · 1
How to stop excel from changing date format
Answers · 1
How to convert text to date in excel
Answers · 1