Excel ยท ChatGPT

Convert Text to Date in Excel

Turn date-looking text into real Excel dates, convert fixed yyyymmdd values, and avoid dd/mm/yyyy vs mm/dd/yyyy locale mistakes. These tested ChatGPT prompts focus on imported dates that Excel does not recognize correctly.

Choose your situation โ€” copy the tested prompt:
I have a column of dates in Excel that look like normal dates, but Excel is treating them as text.

The data is in A2:A6:

A2 โ€” `05/08/2026`
A3 โ€” `12/08/2026`
A4 โ€” `19/08/2026`
A5 โ€” `23/08/2026`
A6 โ€” `30/08/2026`

Additional information:

- The values were imported from a CSV file.
- My Excel regional settings use day/month/year (`dd/mm/yyyy`).
- The cells are currently stored as text, not real Excel dates.
- I do not want to overwrite the original values in column A.
- I want the converted dates in column B.
- After conversion, the values must be real Excel dates that can be sorted, filtered, and used in date calculations.

Please answer in exactly these 6 sections:

1. Formula to use in B2 โ€” Give me the exact formula to convert A2 from text into a real Excel date.
2. Formula to fill down โ€” Tell me whether I can copy the same formula from B2 through B6.
3. Expected results โ€” List A2 through A6 and show the date that should result in column B.
4. How to verify the conversion โ€” Give me at least two simple ways to confirm that the result is a real Excel date rather than text.
5. Why the formula works โ€” Explain what Excel is doing when it converts the text value into its internal date serial number.
6. Important limitation โ€” Explain whether this method depends on Excel correctly interpreting the text as `dd/mm/yyyy`, and what could happen if the workbook or computer uses `mm/dd/yyyy` regional settings instead.

Formatting rules:
- Use exactly six numbered section headings, 1 through 6.
- Use plain text for formulas. Do not use code blocks.
- Do not use Markdown tables.
- In section 3, use one bullet point per cell.
- Keep the answer concise and practical.
- Do not suggest overwriting column A.
- Do not assume that a value merely looking like a date means Excel has stored it as a real date.

Use this when CSV or imported values look like dates but Excel still treats them as text.

I have dates in Excel stored as text in `yyyymmdd` format.

The data is in A2:A6:

A2 โ€” `20260805`
A3 โ€” `20260812`
A4 โ€” `20260819`
A5 โ€” `20260823`
A6 โ€” `20260830`

Additional information:
- The values were imported from another system.
- They are stored as text, not as real Excel dates.
- The format is always exactly `yyyymmdd`.
- I do not want to overwrite the original values in column A.
- I want the converted dates in column B.
- The solution should not depend on whether Excel uses `dd/mm/yyyy` or `mm/dd/yyyy` regional settings.

Please answer in exactly these 6 sections:
1. Formula to use in B2 โ€” Give me the exact formula that converts A2 into a real Excel date.
2. How the formula splits the value โ€” Explain which characters are used for the year, month, and day.
3. Expected results โ€” List A2 through A6 and show the corresponding real date in column B using `dd/mm/yyyy` display format.
4. How to verify the conversion โ€” Give me at least two ways to confirm that B2:B6 contain real Excel dates rather than text.
5. Why this method is safer for yyyymmdd โ€” Explain why explicitly extracting year, month, and day is more reliable than asking Excel to interpret the whole text string automatically.
6. Important limitation โ€” Explain what assumptions this formula makes about the source text and what could go wrong if a value is not exactly eight digits in `yyyymmdd` order.

Formatting rules:
- Use exactly six numbered section headings, 1 through 6.
- Use plain text for formulas. Do not use code blocks.
- Do not use Markdown tables.
- In section 3, use one bullet point per cell.
- Keep the answer concise and practical.
- Do not modify column A.
- Do not use DATEVALUE as the main solution.
- The formula must create a real Excel date, not merely reformat the text.

Use this for fixed eight-digit dates such as 20260805 where year, month, and day must be parsed explicitly.

I have dates in Excel stored as text in `dd/mm/yyyy` format, but the workbook may be opened on computers that use `mm/dd/yyyy` regional settings.

The data is in A2:A7:
A2 โ€” `05/08/2026`
A3 โ€” `12/08/2026`
A4 โ€” `19/08/2026`
A5 โ€” `23/08/2026`
A6 โ€” `07/11/2026`
A7 โ€” `31/12/2026`

Additional information:
- The source data always uses `dd/mm/yyyy`.
- The cells in column A are text, not real Excel dates.
- Some values are ambiguous under US-style settings. For example, `05/08/2026` could be interpreted as either 5 August 2026 or May 8, 2026.
- Some values, such as `19/08/2026`, cannot be valid `mm/dd/yyyy` dates.
- I do not want to overwrite column A.
- I want real Excel dates in column B.
- I need a formula that does not rely on Excel guessing the date order from regional settings.

Please answer in exactly these 6 sections:
1. Formula to use in B2 โ€” Give me an exact formula that converts the `dd/mm/yyyy` text in A2 into a real Excel date without relying on regional date interpretation.
2. How the formula works โ€” Explain how the formula extracts the day, month, and year and passes them to Excel in an unambiguous way.
3. Expected results โ€” List A2 through A7 and show the correct result in column B using `dd/mm/yyyy` display format.
4. Why DATEVALUE is risky here โ€” Explain what could happen if I used `=DATEVALUE(A2)` on a computer configured for `mm/dd/yyyy`, including both ambiguous and impossible dates.
5. How to verify the result โ€” Give me at least two simple checks to confirm that B2:B7 contain real Excel dates and that the day and month have not been swapped.
6. Important assumptions and limitations โ€” Explain what this formula assumes about the source text format and what could go wrong if the values contain extra spaces, missing leading zeros, or a different separator.

Formatting rules:
- Use exactly six numbered section headings, 1 through 6.
- Use plain text for formulas. Do not use code blocks.
- Do not use Markdown tables.
- In section 3, use one bullet point per cell.
- Keep the answer concise and practical.
- Do not modify column A.
- Do not use DATEVALUE as the main solution.
- The formula must create a real Excel date.
- The solution must not depend on `dd/mm/yyyy` or `mm/dd/yyyy` regional settings.

Use this when the source date order is known but Excel's regional settings may interpret it differently.

Before โ€” dates look correct but are still text
CellImported valueStored asProblem
A205/08/2026TextDate calculations may fail
A312/08/2026TextSorting/filtering can behave unexpectedly
A419/08/2026TextNot an Excel date serial
Goal: keep column A unchanged and return real Excel dates in column B.
After โ€” DATEVALUE returns numeric dates
SourceFormulaDisplayed resultCheck
05/08/2026=DATEVALUE(A2)05/08/2026ISNUMBER = TRUE โœ“
12/08/2026=DATEVALUE(A3)12/08/2026Real date โœ“
19/08/2026=DATEVALUE(A4)19/08/2026Real date โœ“
Verified ChatGPT result
=DATEVALUE(A2)

Works here because Excel is configured for dd/mm/yyyy.
Before โ€” fixed yyyymmdd text is not a usable date
CellText valueYearMonthDay
A22026080520260805
A32026081220260812
A42026081920260819
A date-looking eight-digit string must be split into year, month, and day.
After โ€” DATE rebuilds a real date
SourceFormula resultDisplayed date
20260805DATE(2026,08,05)05/08/2026 โœ“
20260812DATE(2026,08,12)12/08/2026 โœ“
20260819DATE(2026,08,19)19/08/2026 โœ“
Verified ChatGPT result
=DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2))

Explicit parsing avoids regional date-order guessing.
Before โ€” DATEVALUE can swap day and month
Source textIntended meaningPossible US interpretation
05/08/20265 Aug 2026May 8, 2026
07/11/20267 Nov 2026July 11, 2026
19/08/202619 Aug 2026#VALUE! possible
Do not let regional settings decide which part is the day and which is the month.
After โ€” parse dd/mm/yyyy explicitly
SourceDayMonthYearResult
05/08/20260508202605/08/2026 โœ“
07/11/20260711202607/11/2026 โœ“
19/08/20261908202619/08/2026 โœ“
Verified ChatGPT result
=DATE(RIGHT(A2,4),MID(A2,4,2),LEFT(A2,2))

DAY and MONTH can be checked afterward to confirm they were not swapped.
Why text-to-date conversion goes wrong โ€” 4 common causes
Date stored as text
Looks like 05/08/2026 but ISNUMBER = FALSE โ†’ convert to a numeric date
Very common
Locale mismatch
05/08/2026 can be read two ways โ†’ parse parts explicitly with DATE
Date issue
yyyymmdd import
20260805 is text โ†’ split year/month/day before building the date
Import issue
Malformed source
Extra spaces, missing zeros, or changing separators can break fixed-position formulas
Validate first

How to Convert Text to Date in Excel with ChatGPT

Diagnose and convert the date โ€” 5 steps
1

Confirm whether the source is really text

Use =ISNUMBER(A2). If it returns FALSE, the value may look like a date but Excel is not storing it as a numeric date serial.

2

Identify the exact source pattern

Check whether the text is fixed dd/mm/yyyy, mm/dd/yyyy, yyyymmdd, or another imported format. The safest formula depends on knowing the order.

3

Use DATEVALUE only when locale is known

If the text matches the computer's regional settings, =DATEVALUE(A2) is concise. If the workbook may move between locales, use explicit parsing instead.

4

Build the date explicitly when order matters

For yyyymmdd, use =DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2)). For fixed dd/mm/yyyy, use =DATE(RIGHT(A2,4),MID(A2,4,2),LEFT(A2,2)).

5

Verify the converted values

Check =ISNUMBER(B2), temporarily format the result as General, and use DAY() plus MONTH() on ambiguous dates to confirm the parts were not swapped.

Locale rule: a date that displays correctly is not necessarily stored correctly. When the source date order is fixed but regional settings may vary, explicitly extract year, month, and day instead of relying on automatic interpretation.

Convert Text to Date in Excel โ€” FAQs

How do I convert text to date in Excel?
If the text matches your regional date format, use =DATEVALUE(A2). It converts date-looking text into Excel's numeric date serial so the result can be used in calculations.
How do I convert yyyymmdd text to a date in Excel?
Use =DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2)). This extracts the four-digit year, two-digit month, and two-digit day explicitly.
Why does Excel not recognize a date imported from CSV?
CSV imports can leave date values stored as text. They may look correct on screen while still failing numeric date checks or calculations.
How do I fix dd/mm/yyyy vs mm/dd/yyyy conversion problems?
Avoid automatic date interpretation. For fixed dd/mm/yyyy text, extract the parts and use =DATE(RIGHT(A2,4),MID(A2,4,2),LEFT(A2,2)).
How can I tell whether an Excel date is real or text?
Use =ISNUMBER(B2). A real Excel date is numeric, so the result should be TRUE. Formatting the cell as General will also reveal the underlying date serial number.

Related Excel workflows