Excel Convert Date to Different Format: Full Guide
In this article
To convert a date to a different format in Excel, select the cell(s), press Ctrl+1 to open Format Cells, then choose a format from the Date category or type a custom code like yyyy-mm-dd in the Type box. This changes only the display, not the underlying date value, which remains a serial number.
Why Excel Dates Need Formatting
Excel stores dates as serial numbers – the number of days since January 1, 1900 (for Windows) or January 1, 1904 (for Mac). For example, January 1, 2025 is serial number 45658. Because the underlying value is a number, you can format it any way you like without changing the actual date. This is why the same cell can show 01/15/2025, 15-Jan-25, or Wednesday, January 15, 2025 – all while the cell value stays 45676.
Knowing this distinction is crucial: when you change the format, you are not converting the data itself. You are only changing how Excel displays the serial number. This means you can always revert to a different format later without losing any data.
How to Change Date Format in Excel (Step-by-Step)
There are several ways to apply a new date format. The most direct methods are:
- Format Cells dialog (most control): Select the cell(s) → press Ctrl+1 (Windows) or Cmd+1 (Mac) → go to the Number tab → click Date → choose a locale and format → click OK.
- Ribbon quick pick: On the Home tab, in the Number group, click the small arrow next to the Number Format box and select More Number Formats… (or choose a short date/long date preset).
- Custom format: In the Format Cells dialog, go to Custom and type a code like
dd-mmm-yyyyoryyyy/mm/dd. - Keyboard shortcut for date: Press Ctrl+Shift+# to apply the default short date format (e.g.,
dd-mmm-yy).
If you need to apply the same format to many cells, select the entire range first, then apply the format. You can also use the Format Painter to copy a format from one cell to others.
Custom Date Format Codes Explained
Custom format codes give you complete control. Here are the building blocks:
- d – day number (1–31) without leading zero
- dd – day number with leading zero (01–31)
- ddd – abbreviated weekday (Mon, Tue)
- dddd – full weekday (Monday, Tuesday)
- m – month number (1–12) without leading zero
- mm – month number with leading zero (01–12)
- mmm – abbreviated month (Jan, Feb)
- mmmm – full month name (January)
- yy – two-digit year (25)
- yyyy – four-digit year (2025)
You can combine these with separators like -, /, or .. For example, dd-mmm-yyyy displays as 15-Jan-2025. To include text, put it in quotes: dd" of "mmmm" "yyyy gives 15 of January 2025.
Converting Text to a Real Date (and Vice Versa)
Often dates come as text (e.g., from a CSV file) and Excel won’t format them because they aren’t recognized as dates. To convert text to a real date:
- Select the column with the text dates.
- Go to Data → Text to Columns.
- Choose Delimited → Next → uncheck all delimiters → Next.
- Under Column data format, select Date and choose the order that matches your text (e.g., MDY if it’s
01/15/2025). - Click Finish. Now the cells contain real dates and can be formatted freely.
Alternatively, use the DATEVALUE function: =DATEVALUE("01/15/2025") returns the serial number. To convert a real date to text, use TEXT: =TEXT(A1,"dd-mmm-yyyy").
Common Problems and How to Fix Them
Here are typical issues you might encounter:
- Date shows as a number (e.g., 45676): The cell is formatted as General or Number. Apply a date format to see it as a date.
- Date shows as #####: The column is too narrow. Double-click the column header boundary to auto-fit, or widen it manually.
- Format changes don’t stick: If the cell contains text (e.g., a left-aligned date), Excel won’t apply date formats. Convert text to a real date first.
- Wrong century for two-digit years: Excel interprets 00–29 as 2000–2029 and 30–99 as 1930–1999. Use four-digit years to avoid confusion.
- Date appears with time (e.g., 01/15/2025 0:00): Your format includes time. Use a date-only format like
dd-mmm-yyyy.
Date Formatting in Formulas and PivotTables
When you use dates in formulas, the format doesn’t affect calculations because Excel uses the serial number. For example, =A1+1 adds one day regardless of how A1 is displayed. However, when you concatenate dates with text, you must use the TEXT function to control the format: ="Report date: "&TEXT(A1,"mmmm d, yyyy").
In PivotTables, date fields can be grouped by month, quarter, or year, but the grouping is based on the underlying serial number, not the display format. If you want a specific format in a pivot, right-click the date field → Field Settings → Number Format.
Frequently Asked Questions
Q: How do I change the date format for an entire column?
Select the whole column by clicking its header, then press Ctrl+1 and choose a format. All cells in that column will change.
Q: Why does Excel keep changing my date format back?
This usually happens when the cell contains text, or when you have a formula that returns text. Ensure the cell contains a true date (a number) and that the format is set to Date, not General.
Q: How do I convert a date to ISO 8601 format (yyyy-mm-dd)?
Use a custom format code: yyyy-mm-dd. Or use the TEXT function: =TEXT(A1,"yyyy-mm-dd").
Q: Can I change the date format without altering the underlying value?
Yes, formatting only changes the display. The serial number remains the same, so calculations are unaffected.
Q: How do I convert a date to text in a specific format?
Use the TEXT function: =TEXT(A1,"dd-mmm-yyyy"). This returns a text string that looks like a date but is not a real date.
Q: My dates are showing as numbers after I import a CSV. How do I fix them?
Use Text to Columns as described above, or use the DATEVALUE function on each cell. You may need to replace delimiters first if the format isn’t recognized.