How to Convert Date to Text in Excel Using the TEXT Function

📅 Oct 17, 2026 📝 Sarah Miller

Standardizing date formats in Excel often becomes frustrating when combining text, as dates frequently revert to raw serial numbers. While standard cell formatting visually alters the date, it fails to preserve this appearance during concatenation or exporting.

Utilizing the TEXT function grants complete, predictable control over your data strings. As a crucial stipulation, however, once converted to text, these values can no longer be used in chronological calculations. For instance, using =TEXT(A1, "yyyy-mm-dd") reliably outputs "2023-10-27" as static text. Below, we outline the exact syntax configurations required for various custom date formats.

How to Convert Date to Text in Excel Using the TEXT Function

Excel Formula to Convert Date to Text Format: A Complete Guide

In Microsoft Excel, dates are stored behind the scenes as sequential serial numbers. For example, the date January 1, 1900, is serial number 1, while January 1, 2024, is serial number 45292. Because Excel reads dates as numeric values, simply typing or referencing a date in a text formula often results in a confusing string of numbers instead of a readable date.

To preserve, manipulate, or display dates alongside text, you must convert them into a text format. This comprehensive guide will show you how to use Excel formulas-primarily the versatile TEXT function-to convert dates to text exactly the way you want.

Why Do We Need to Convert Dates to Text?

If you have ever tried to combine a text string with a date cell using a formula like ="Today's date is " & A1, you probably noticed the output looked something like this: Today's date is 45292.

This happens because Excel strips away the visual formatting of cell A1 and pulls its raw serial number. To force Excel to display the date in a readable format within a text string, you must convert the date value into a text string using a formatting formula.

The Core Formula: The TEXT Function

The primary and most efficient tool for converting dates to text in Excel is the TEXT function. This function allows you to convert any numeric value (including dates) into text using a specific format of your choice.

Syntax of the TEXT Function

=TEXT(value, format_text)
  • value: The date, reference to a cell containing a date, or a formula that returns a date.
  • format_text: A text string enclosed in quotation marks that defines the layout of your date (e.g., "yyyy-mm-dd", "dddd, mmmm dd, yyyy").

Understanding Date Format Codes

To get the exact text output you need, you must master the format codes used inside the TEXT function. These codes are divided into days, months, and years:

Category Code Description Example (for Oct 9, 2024)
Day d Day number without a leading zero (1-31) 9
dd Day number with a leading zero (01-31) 09
ddd Three-letter abbreviation of the weekday Wed
dddd Full name of the weekday Wednesday
Month m Month number without a leading zero (1-12) 10
mm Month number with a leading zero (01-12) 10
mmm Three-letter abbreviation of the month name Oct
mmmm Full month name October
mmmmm The first letter of the month name O
Year yy Two-digit year 24
yyyy Four-digit year 2024

Practical Examples of Date to Text Conversion

Example 1: Basic Date Formatting

Suppose you have a date in cell A2 (e.g., 12/25/2024). Here is how you can convert it using different formulas:

  • Convert to YYYY-MM-DD:
    =TEXT(A2, "yyyy-mm-dd") → "2024-12-25"
  • Convert to Day, Month Name, Year:
    =TEXT(A2, "dd mmmm yyyy") → "25 December 2024"
  • Convert to short UK style:
    =TEXT(A2, "dd/mm/yy") → "25/12/24"

Example 2: Extracting Specific Components

Sometimes you only want a specific text component of a date, such as the day of the week or the month name:

  • Get the full day of the week:
    =TEXT(A2, "dddd") → "Wednesday"
  • Get the short month name:
    =TEXT(A2, "mmm") → "Dec"
  • Get the quarter (using a helper formula):
    ="Q" & INT((MONTH(A2)-1)/3)+1 → "Q4"

Example 3: Combining Text and Dates

This is the most common use case for converting dates to text. If you want to create a sentence that references a date dynamically, write a formula like this:

="The report was generated on " & TEXT(TODAY(), "dddd, mmmm d, yyyy") & "."

Result: "The report was generated on Wednesday, October 9, 2024."

Advanced Scenarios and Workarounds

1. Capitalizing the First Letter of a Month/Day

By default, Excel will output the text conversion based on your operating system's locale settings. If you want to force uppercase or proper case formatting regardless of current settings, you can wrap the TEXT formula in text manipulation functions like UPPER, LOWER, or PROPER.

To convert a date to uppercase month name:

=UPPER(TEXT(A2, "mmmm yyyy"))

Result: "DECEMBER 2024"

2. Handling Blank Cells

If you apply a TEXT formula to an empty cell, Excel defaults to evaluating the blank cell as 0 (which translates to the date January 0, 1900). Your output might look like "January 0, 1900" or "Saturday, January 00, 1900".

To prevent this, wrap your conversion in an IF statement to check if the cell is blank:

=IF(ISBLANK(A2), "", TEXT(A2, "yyyy-mm-dd"))

This formula checks if cell A2 is empty; if it is, it returns an empty string (""), otherwise, it processes the text conversion.

3. Creating Fiscal Year Text Strings

Many organizations work on a fiscal calendar. You can convert a standard date into a "FY" text format using a combination of YEAR, MONTH, and IF statements. For a fiscal year ending in June:

="FY" & IF(MONTH(A2)>=7, RIGHT(YEAR(A2)+1, 2), RIGHT(YEAR(A2), 2))

If the date is October 9, 2024, the formula returns "FY25".

Alternative Method: Using Power Query

If you are transforming large datasets and don't want to use nested sheet formulas, you can use Excel's Power Query editor to convert dates to text.

  1. Select your data range and go to the Data tab, then click From Table/Range.
  2. In the Power Query editor, select the column containing your dates.
  3. Right-click the column header, select Change Type, and choose Text.
  4. Power Query will convert all date objects into static text formatting. Click Close & Load to return the data to your worksheet.

Summary

Converting dates to text in Excel is a fundamental skill for building clean, dynamic reports. Using the TEXT function with codes like dddd, mmmm, and yyyy, you can control exactly how dates appear when joined with other text strings. Remember to account for empty cells using IF(ISBLANK()), and use Excel's uppercase/proper case tools to format your text precisely.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.