Write dates as text with TEXT

Working with dates · About 5 minutes

Write dates as text with TEXT

TEXT turns a date into words and numbers laid out your way. =TEXT(B2,"dddd") reads as "B2 written as a weekday name", like Friday.

The codes go in quotes: mm is the month as two digits and mmm its short name, dd the day, yyyy the year, and dddd the weekday. So "mm/dd/yyyy" gives 03/14/2025 and "mmm yyyy" gives Mar 2025.

This matters when you join a date to words. ="Shipped "&B2 shows the date's number, Shipped 45730. Wrap the date in TEXT to keep it a date.

Some countries write the day first (14/03/2025). The codes say which order you get, so check them before you share a sheet.

Part of Plus

Free during our founding launch: sign in to unlock this lesson's exercises, the timed practice sets and the rest of Plus. The free lessons stay free, with no account needed.

What TEXT for dates does

TEXT writes a date out the way you choose: the day's name, the month's name, or a full date like Jul 9, 2026. You give it the date and a short code in quotes that describes the layout.

It is most useful when a date sits inside a sentence or a label, like a report title, because joining a date to words otherwise shows its number. The answer is text, not a date, so keep the real date in its own cell for any date maths.

How to write TEXT for dates

=TEXT(value, format_text)

value
The date to write out, usually a cell like B2.
format_text
The layout, in quotes. d is the day, ddd the short day name and dddd the full one, mmm the short month name, mmmm the full one, and yyyy the year.

TEXT for dates worked example

A club lists its events by date. In C2, write the Quiz date out as a label like Jul 9, 2026, then fill down to C4.

A club lists its events by date. In C2, write the Quiz date out as a label like Jul 9, 2026, then fill down to C4.
ABC
1EventDateLabel
2Quiz07/09/2026Jul 9, 2026
3Picnic08/22/2026Aug 22, 2026
4Walk10/03/2026Oct 3, 2026
C2=TEXT(B2,"mmm d, yyyy")Write the date in B2 as the short month name, the day, a comma and the year: Jul 9, 2026.

Common TEXT for dates mistakes

The list sorts April before March

TEXT gives text, and text sorts A to Z. Sort or calculate on the column of real dates, and use the TEXT column only for showing.

The month shows as 00

Next to an hour or seconds, mm means minutes, not the month. Use mmm for the month's name, or keep mm away from h and ss.

The formula shows #NAME?

The format code needs quotes around it. Write "dddd", not dddd on its own.

TEXT or a date format?

If the cell only needs to look different, change its format to a date style instead. The cell then stays a real date that you can sort, add to and compare. Use TEXT when the date has to be joined to words or shown in a layout no format offers.

The codes above work the same in Excel and Google Sheets. In Excel, the separators and some formats follow the computer's regional settings, so a file can look different on another computer.

Questions people ask

How do I get the day name from a date in Excel?

=TEXT(B2,"dddd") gives the full name, like Friday. "ddd" gives the short name, like Fri.

Why does my date turn into a number when I join it to text?

Joining uses the date's stored number. Wrap it in TEXT: ="Shipped "&TEXT(B2,"mm/dd/yyyy").

What do mm, mmm and yyyy mean?

mm is the month as two digits, mmm its short name, dd the day and yyyy the four-digit year.

How do I show the day first, like 14/03/2025?

Put the day code first: =TEXT(B2,"dd/mm/yyyy"). The codes decide the order you get.

Theme