To change the date format in Excel, select the cells, press Ctrl+1, open the Number tab, choose Date and pick a style from the Type list. If none of the built-in styles fits, switch to Custom and edit the format code, for example dd-mmm-yyyy.
The steps below follow Microsoft's documentation for desktop Excel on Windows and macOS, with a note on Excel for the web. Everything here changes how a date is displayed. The underlying value stays the same.
How to change the date format with Format Cells
- Select the cells, column or range that hold the dates.
- Press
Ctrl+1on Windows orCommand+1on macOS. This opens Format Cells. - On the Number tab, click Date under Category.
- Under Type, click a format. The Sample box shows how your first selected date will look.
- Click OK.
In Excel for the web there is no Format Cells dialog for this. Select the cell, open the Number Format dropdown on the Home tab and choose Short Date or Long Date.
A quick shortcut: select a cell and press Ctrl+Shift+# to apply Excel's default date format.
Why some formats change on their own
In the Type list, some formats begin with an asterisk (*). Those follow the regional date and time settings of your computer, so the same workbook can show 2/3/2026 as 3 February on one machine and 2 March on another. Formats without an asterisk stay exactly as written. If a workbook is shared across countries, pick a format without an asterisk, or one that spells out the month name, so nobody misreads the day and month.
How to make a custom date format
Microsoft's recommended method is to start from the closest built-in format and edit it:
- Open Format Cells with
Ctrl+1and pick the nearest format under Date. - Switch Category to Custom. The code for that format now appears in the Type box.
- Edit the code using the table below, then click OK.
Your edits apply only to the new custom format. The built-in format is not modified.
| Code | Shows |
|---|---|
m | Month as 1 to 12 |
mm | Month as 01 to 12 |
mmm | Month abbreviated, Jan to Dec |
mmmm | Month in full, January to December |
d | Day as 1 to 31 |
dd | Day as 01 to 31 |
ddd | Weekday abbreviated, Sun to Sat |
dddd | Weekday in full, Sunday to Saturday |
yy | Year as two digits, 00 to 99 |
yyyy | Year as four digits, 1900 to 9999 |
Combine the codes with separators such as /, -, a space or a comma. Example output for 2 February 2026:
| Format code | Example output |
|---|---|
dd-mmm-yyyy | 02-Feb-2026 |
yyyy-mm-dd | 2026-02-02 |
mm/dd/yy | 02/02/26 |
dddd, mmmm d, yyyy | Monday, February 2, 2026 |
One trap: if a code also shows time, an m placed right after h or hh, or right before ss, is read as minutes, not month.
How to change the date format with a formula (TEXT)
The TEXT function turns a date into a text string in the layout you give it:
=TEXT(A2,"dd-mmm-yyyy")
=TEXT(TODAY(),"DDDD")
="Due: "&TEXT(B2,"mm/dd/yy")
The syntax is TEXT(value, format_text). The format codes are the same ones as in the table above and are not case sensitive, so "MM/DD/YY" and "mm/dd/yy" behave identically. The third formula shows the main reason to use TEXT: when you join a date to other text with &, the date's own formatting is lost and you get a serial number, unless you wrap the date in TEXT.
Two limits apply. First, TEXT returns text, not a date, so the result is awkward to use in later calculations. Keep the original date in one cell and put the TEXT formula in another. Second, the codes depend on regional settings. A code that works on a US-English install may behave differently under another language, so test the formula on the machine that will open the file.
Dates that will not change format
If you apply a date format and nothing happens, the cell almost certainly holds text, not a date. Excel stores a real date as a serial number: 1 January 1900 is 1, and in the default Windows date system dates run up to 31 December 9999. Formatting only changes how that number is displayed. A text string that merely looks like a date has no number behind it, so there is nothing to reformat.
Microsoft notes that dates stored as text are left-aligned in the cell, and that text dates with two-digit years may show a small green triangle in the corner. To convert them with DATEVALUE:
- In a blank cell with the General format, type
=DATEVALUE(A2), replacingA2with the first text date, and pressEnter. You get a serial number. - Fill the formula down to cover all the text dates.
- Copy the serial numbers and use Paste Special with Values over the original cells, if you want to replace them.
- Apply a date format with
Ctrl+1as described above. - Delete the helper column.
Microsoft's own examples show how forgiving the function is. =DATEVALUE("8/22/2011") returns 40777, =DATEVALUE("22-MAY-2011") returns 40685 and =DATEVALUE("2011/02/23") returns 40597. If the year is left out, the current year from your computer's clock is used. A date outside the supported range returns #VALUE!.
For text dates with two-digit years, the green-triangle error button offers Convert XX to 20XX or Convert XX to 19XX. Pick the century that matches your data.
Other problems and their causes
- The cell shows
#####. The column is too narrow for the formatted date. Double-click the right border of the column header to fit the content, or drag it wider. - You typed
2/2and got2-Feb. Excel treated the entry as a date and applied your system's default date setting. Reformat the cell as described above. Setting the format before you type the data avoids the surprise. - Day and month are swapped after a file is shared. The format starts with an asterisk and follows the regional setting of each computer. Switch to a format without an asterisk or one that includes the month name.
- You want a date in another language's style. On Windows, set the Office language preferences under File > Options > Language. On macOS, use System Settings > General > Language & Region > Region.
Insert today's date
For a date that stays fixed, select an empty cell and press Ctrl+;. For a date that updates, type =TODAY() and press Enter; it refreshes whenever the worksheet opens or recalculates. Both produce real dates, so every format above applies to them.
Frequently asked questions
- Why won't my date format change in Excel?
- The cell most likely holds text that looks like a date, not a real date. Excel only reformats real dates, which are stored as serial numbers. Text dates are left-aligned by default. Convert them with DATEVALUE and then apply a date format to the result.
- What is the default date format in Excel?
- Excel takes its default date format from the regional date setting of your computer. Select a cell and press Ctrl+Shift+# to apply that default date format. Formats marked with an asterisk in the Format Cells list follow the regional setting; formats without one stay fixed.
- How do I show the month name instead of a number?
- Open Format Cells with Ctrl+1, choose Custom, and use mmm for the abbreviated month (Jan to Dec) or mmmm for the full name (January to December). Putting the code in the format changes only how the date looks; the cell still holds the same date.
- Does the TEXT function change the date itself?
- No. TEXT returns text, not a date, so the result cannot be used directly in date calculations. Keep the original date in one cell and use TEXT in another cell when you need a formatted string, for example to join a date to other words.