To get a date as text in Excel, use the TEXT function with a format code, like =TEXT(A1,"dd-mmm-yyyy"), which converts a real date in cell A1 into a text string. Alternatively, use the Text to Columns wizard or the TEXTJOIN/CONCATENATE functions to combine dates with other text. This article explains each method, when to use it, and how to avoid common pitfalls like dates turning into serial numbers.
Why Dates in Excel Are Not Really Text
Excel stores dates as serial numbers, where 1 equals January 1, 1900, and each day adds 1. For example, July 4, 2025 is serial number 45,841. This design allows date arithmetic (subtracting two dates gives days between them), but it means a date cell is a number with a date number format applied. When you copy a date to a text field, concatenate it with text, or export it to a CSV, Excel may show the serial number instead of the formatted date. Converting dates to text is the standard workaround.
Method 1: The TEXT Function (Most Flexible)
The TEXT function converts a number to text using a format code. The syntax is =TEXT(value, format_text). Assume cell A1 contains the date 2025-07-04 (formatted as a date). To get “July 4, 2025” as text, use:
=TEXT(A1,"mmmm d, yyyy")
This returns the text string July 4, 2025. Common format codes:
"dd/mm/yyyy"→ 04/07/2025"mmm-yy"→ Jul-25"dddd"→ Friday (day name)"yyyy-mm-dd"→ 2025-07-04 (ISO format)
You can combine with text: =TEXT(A1,"dd") & " of " & TEXT(A1,"mmmm") returns 04 of July. Note that the result is left-aligned by default (text) and cannot be used in date calculations.
Method 2: Text to Columns (No Formula)
If you want to permanently convert a column of dates to text without formulas, use the Text to Columns wizard:
- Select the column with dates.
- Go to Data > Text to Columns.
- Choose Delimited, click Next, uncheck all delimiters, click Next.
- Under Column data format, select Text, then click Finish.
This changes the cells to text strings that display exactly as they looked before. On Mac, the path is Data > Text to Columns. Excel for the web does not have Text to Columns; use the TEXT function instead. Caution: this overwrites the original date values, so save a backup first.
Method 3: Concatenation with & or CONCAT
When you join a date with other text using the ampersand (&), Excel converts the date to its serial number unless you wrap it in TEXT. For example, ="Date: " & A1 returns Date: 45841 if A1 is 2025-07-04. To get a readable date, use:
="Date: " & TEXT(A1,"mmmm d, yyyy")
This returns Date: July 4, 2025. The CONCAT function works the same: =CONCAT("Date: ", TEXT(A1,"yyyy-mm-dd")). For Excel 2016 and later, CONCAT replaces CONCATENATE, but both exist.
Method 4: Format Cells as Text Before Entering
If you are typing dates manually and want them stored as text, pre-format the cells:
- Select the cells.
- Press Ctrl+1 (Cmd+1 on Mac) to open Format Cells.
- Go to the Number tab, choose Text, and click OK.
Now any date you type, such as 07/04/2025, is stored as text exactly as typed. This is useful for IDs or dates that should not be interpreted (e.g., 13/13/2025 would be invalid as a date but fine as text). However, this method does not convert existing dates; it only affects new entries.
Common Problems and Fixes
- Date shows as #####: The column is too narrow. Widen it, or use TEXT to force a shorter format like
"mmm-yy". - Serial number appears after concatenation: Always wrap the date reference in TEXT inside the formula.
- Locale differences: The TEXT function uses your system’s date separators. For a fixed format, use codes like
"yyyy"for year,"mm"for month,"dd"for day—these are locale-independent for the digits. - Leading zeros lost: If you convert a date like 2025-01-05 to text with
"m/d/yyyy", you get 1/5/2025 without leading zeros. Use"mm/dd/yyyy"to keep them. - Text date not recognized in formulas: Text dates cannot be subtracted or used in date functions. To convert back, use
DATEVALUEif the text is a valid date format, e.g.,=DATEVALUE("7/4/2025")returns 45841.
How to Choose the Right Method
Use the TEXT function when you need a dynamic result that updates if the original date changes, or when combining with other text. Use Text to Columns when you want a one-time conversion that removes the original date value. Use pre-formatting as Text when entering new data that should never be treated as a date. For exporting to other systems, TEXT with "yyyy-mm-dd" is safest because it avoids ambiguous month/day ordering.
Frequently Asked Questions
How do I convert a date to text without losing the format?
Use =TEXT(A1,"mm/dd/yyyy") or any format code you need. The result is a text string that displays exactly as the format specifies, and it will not change when you copy it elsewhere.
Why does my date turn into a number when I use &?
Because Excel stores dates as serial numbers. The & operator converts the underlying value to text, which is the serial number. Wrap the date in TEXT: =A1 & " " & TEXT(B1,"m/d/yyyy").
Can I convert text back to a date?
Yes, use DATEVALUE for text that looks like a date, e.g., =DATEVALUE("7/4/2025"). For text with a custom format, use DATE with LEFT, MID, RIGHT to extract parts.
Does the TEXT function work in Excel for the web?
Yes, TEXT works in Excel for the web, but Text to Columns does not. Use TEXT or the TEXTBEFORE/TEXTAFTER functions (Microsoft 365) for splitting.
What is the difference between TEXT and formatting a cell as Text?
Formatting a cell as Text changes how future entries are stored (as text). The TEXT function converts an existing value to a text string in a formula. Formatting does not change existing dates; TEXT does.
How do I get the day of the week as text?
Use =TEXT(A1,"dddd") for full name (Friday) or "ddd" for abbreviation (Fri). This works regardless of the original date format.
Related
- How to Write on a Casio Calculator (fx-991EX, ClassWiz & More)
- Random 5 Digit Number: How to Generate One
- How to Calculate Budget Balance
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Hide and Password-Protect Columns in ExcelTo hide a column in Excel for Microsoft 365 on Windows, select its letter, then choose Home >…
- How to Use Slide Master View in PowerPoint EffectivelyTo use Slide Master view in PowerPoint for Microsoft 365 on Windows, choose View > Slide Master, select…
- How to Freeze Columns in Excel While Scrolling: A GuideTo keep a column visible as you scroll horizontally in Excel for Microsoft 365 on Windows, select View…
- How to Calculate a Percentage of a Number in ExcelTo get a percentage of a number in Excel, multiply the number by the percentage: enter the number…
- Excel Column Width: Units, Settings, and AutoFitIn Microsoft Excel for Microsoft 365 on Windows, column width is measured in character-based units—not as a fixed…
- Goal Seek in Excel: Step-by-Step Guide to Finding a ValueTo use Goal Seek in Excel, create a formula for the result you want, then choose Data >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.