In Excel: use =DATEVALUE(A2) when the text is in your regional order, or Data ▸ Text to Columns ▸ Next ▸ Next ▸ Date ▸ pick the order (DMY/MDY/YMD) ▸ Finish when it is not.
On this page7
Confirm the problem: dates as text left-align by default and =ISTEXT(A2) returns TRUE.
Try =DATEVALUE(A2) first — if it works, copy the results and Paste Special ▸ Values over the original column.
If it returns #VALUE!, use Data ▸ Text to Columns, click Next twice, set Column data format to Date and choose the order that matches the text (DMY, MDY or YMD), then Finish.
For fixed-width strings like 20260413, build it with =DATE(LEFT(A2,4), MID(A2,5,2), RIGHT(A2,2)).
Strip stray spaces first with =TRIM(A2) and non-breaking spaces with =SUBSTITUTE(A2, CHAR(160), "") — imported data is full of both.
Format the result cells as Date, since all three routes return a serial number.
What this does
A date that arrived as text sits left-aligned, ignores date formats and returns nothing useful from date arithmetic. Three routes fix it. DATEVALUE parses a text date into a serial number, but only in the order your Windows/Mac regional settings expect — feed it "13/04/2026" on a US machine and it returns #VALUE!. Text to Columns is the reliable one, because step 3 lets you state the order explicitly. And for anything Excel refuses to parse, DATE with LEFT/MID/RIGHT builds the date from its pieces. Whichever route you take, the result is a serial number, so format the cell as a Date afterwards. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “convert text to date in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a data step that keeps your analysis trustworthy useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
A2 holds the text 13/04/2026 on a machine set to US formats. =DATEVALUE(A2) returns #VALUE!. Instead: select the column ▸ Data ▸ Text to Columns ▸ Delimited ▸ Next ▸ Next ▸ Column data format: Date ▸ DMY ▸ Finish. The cells become real dates and right-align. For a stubborn format like 20260413, =DATE(LEFT(A2,4), MID(A2,5,2), RIGHT(A2,2)) returns 13 April 2026. A quick test for whether a cell is text: =ISTEXT(A2), or check whether it left-aligns by default. Every export, CSV and copy-paste from a web page arrives with dates as text, and until they are real serial numbers nothing sorts, filters, subtracts or pivots by date correctly. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “convert text to date in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Applying a date format to text and assuming it converted — formatting changes appearance, never the underlying type.
- Using
DATEVALUEon a text order that differs from the machine's regional setting, which silently returns#VALUE!or, worse, a valid but wrong date when day and month are both ≤ 12. - Forgetting that a trailing non-breaking space from a web paste blocks every parser.
- Converting on one machine and shipping the workbook to a region with different settings, when Text to Columns with an explicit order would have been unambiguous.
Frequently asked questions
How do I convert text to a date in Excel?
=DATEVALUE(A2) works when the text matches your regional date order. When it does not, use Data ▸ Text to Columns and set the column format to Date with the correct DMY/MDY/YMD order.
Why does DATEVALUE return #VALUE!?
The text is not in the order your system expects, or it contains stray spaces. Clean it with TRIM and SUBSTITUTE(A2,CHAR(160),""), or use Text to Columns where you state the order yourself.
How do I tell whether a cell is a real date?
Real dates right-align by default and =ISNUMBER(A2) returns TRUE. Text dates left-align and =ISTEXT(A2) returns TRUE.
How do I convert 20260413 to a date?
Build it from the pieces: =DATE(LEFT(A2,4), MID(A2,5,2), RIGHT(A2,2)). Text to Columns with the YMD format also handles it.
Other ways people ask this
On the way here you may have searched this as “excel convert date to text”, “convert text date to date excel”, “how to convert text to date in excel” and “excel convert date text” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “excel convert date to text”, “convert text date to date excel”, “how to convert text to date in excel” all point at the one operation explained on this page, which is why they all lead here.