How-to recipes · Dates and times

How to convert a date to text in Excel

Turn a date into text in any format with TEXT, join dates into sentences without seeing serial numbers, and use format codes for days and months.

Beginner TEXT DATE TODAY WEEKDAY MONTH YEAR

Dates are numbers in Excel. As long as they stay in their own cells, the number format makes them look like dates. The moment you join a date with text, for example to build Invoice due 30 Apr 2026, Excel uses the underlying number and you get Invoice due 46142. The same happens when you need a date in a fixed format for a file name, an ID, an export or a label. The TEXT function converts a date into text in exactly the format you choose.

The example data

Two dates in A2:A3: Sunday 15 March 2026 and 30 April 2026.

The formula: TEXT with a format code

D2fx=TEXT(A2,"dddd, d mmmm yyyy")
ABCD
1DateAmount
22026-03-151250Sunday, 15 March 2026
32026-04-30980

The result is text, aligned to the left; it no longer behaves like a date.

Result: Sunday, 15 March 2026

The second argument is a format code, the same kind of code you use in custom number formats. The most useful parts:

CodeMeaningExample for 15 March 2026
d / ddday without / with leading zero15 / 15
ddd / ddddshort / full weekday nameSun / Sunday
m / mmmonth number without / with leading zero3 / 03
mmm / mmmmshort / full month nameMar / March
yy / yyyytwo- / four-digit year26 / 2026
hh:mmhours and minutes00:00

Dates inside sentences

Wrap the date in TEXT before joining it with &:

D3fx="Invoice due "&TEXT(A3,"d mmm yyyy")
ABCD
1DateAmount
22026-03-151250
32026-04-30980Invoice due 30 Apr 2026

Without TEXT the result would read Invoice due 46142.

Result: Invoice due 30 Apr 2026

Other common uses: a report title such as ="Sales report for "&TEXT(TODAY(),"mmmm yyyy"), which always shows the current month with TODAY; a file name such as ="Export_"&TEXT(TODAY(),"yyyy-mm-dd")&".csv", which sorts correctly in folders; and a compact ID such as ="INV-"&TEXT(A2,"yyyymmdd")&"-001".

Microsoft 365: whole columns

TEXT accepts ranges: =TEXT(A2:A3,"mmm yyyy") spills Mar 2026 and Apr 2026. Combined with UNIQUE it produces a list of months that appear in the data: =UNIQUE(TEXT(A2:A100,"yyyy-mm")).

Formatting versus converting

If you only want the date to look different in its own cell, do not convert it: select the cell, press Ctrl+1 [Mac: Cmd+1], choose Custom and type a code such as dddd, d mmmm yyyy. The cell stays a real date that you can sort, filter and calculate with. Convert with TEXT only when you need text: for joining, exporting, or as a grouping key. Number formats are explained in Number formats and custom format codes.

Without formulas: Text to Columns

To permanently turn a column of dates into text in its current display format, there is no single button. The practical way is to add a helper column with =TEXT(A2,"yyyy-mm-dd"), then copy it and paste as values over the original. Typing an apostrophe before a date ('2026-03-15) also stores it as text.

Weekday and month names

The day name of a date is =TEXT(A2,"dddd") (Sunday). For the weekday as a number, use WEEKDAY instead; for the month as a number, MONTH. Numbers are better for sorting and calculations, names are better for labels.

Pitfalls

  • Language of the format codes. The codes follow the language of Excel. In a German version the year code is JJJJ, in French aaaa. A workbook built with "yyyy" can show the code itself on a computer with another language. For international files, prefer the cell format over TEXT, or use the ISO format yyyy-mm-dd, which is the least ambiguous.
  • Month vs minute. mm means month, except right after h or before ss, where it means minutes. "hh:mm" shows minutes; "mm" alone shows the month.
  • Text can't be calculated. After TEXT, =D2+1 returns #VALUE! or a strange result. Keep the original date for calculations.
  • Sorting text dates sorts alphabetically: 1 Apr comes before 15 Mar. Use the yyyy-mm-dd format if the text must sort in date order.
Tip. The reverse conversion, from text to a real date, is in How to convert text to a date in Excel. To show the quarter of a date as text such as Q1 2026, see How to get the quarter from a date in Excel.
⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 13 KB

More how-to recipes