Excel Convert Date to Ordinal: 4 Easy Ways
In this article
- What Does “Ordinal Date” Mean in Excel?
- Method 1: Custom Number Format for Ordinal Suffixes
- Method 2: Formula to Add “st”, “nd”, “rd”, “th”
- Method 3: Day-of-Year (Ordinal Number) Calculation
- Method 4: Power Query for Bulk Conversion
- How to Choose the Right Method
- Common Mistakes and Troubleshooting
- Frequently Asked Questions
This guide explains how to convert a regular date (like 4/15/2025) into an ordinal date (like 15-Apr-2025 or 105) in Microsoft Excel. You’ll learn four different methods—using custom number formats, the TEXT function, a formula for day-of-year, and Power Query—so you can pick the one that fits your data and skill level.
What Does “Ordinal Date” Mean in Excel?
In everyday language, an ordinal date usually means a date written with an ordinal suffix, such as “April 15th, 2025” or “15th April 2025.” In data analysis, however, “ordinal date” often refers to the day number within the year—for example, April 15 is day 105 of a non‑leap year. This article covers both meanings, because Excel users search for both, and the methods differ.
Method 1: Custom Number Format for Ordinal Suffixes
If you want the date to display as “15-Apr-2025” (without the suffix) or “15th Apr 2025” (with the suffix), a custom number format is the simplest approach. It changes only the display—the underlying cell still contains a real date, so you can sort, filter, and calculate normally.
- Select the cell(s) containing your dates.
- Press Ctrl+1 to open the Format Cells dialog.
- Go to the Number tab, choose Custom at the bottom of the list.
- In the Type box, enter one of these codes:
dd-mmm-yyyy→ 15-Apr-2025dd-mmm→ 15-Aprmmmm d, yyyy→ April 15, 2025ddd, mmm d→ Tue, Apr 15
None of these produce the “th” or “st” suffix. Excel’s built-in formats do not include ordinal suffixes, so you need a formula for that.
Method 2: Formula to Add “st”, “nd”, “rd”, “th”
To get “15th April 2025” as a text string, use a formula that appends the correct suffix based on the day number. The logic for English ordinals is:
- If the day is 11, 12, or 13 → use “th” (11th, 12th, 13th).
- Otherwise, if the day ends in 1 → “st”, 2 → “nd”, 3 → “rd”, everything else → “th”.
Assuming your date is in cell A1, the formula is:
=DAY(A1)&IF(OR(DAY(A1)=11,DAY(A1)=12,DAY(A1)=13),"th",IF(MOD(DAY(A1),10)=1,"st",IF(MOD(DAY(A1),10)=2,"nd",IF(MOD(DAY(A1),10)=3,"rd","th"))))&" "&TEXT(A1,"mmmm yyyy")
This returns something like “15th April 2025”. It’s a text value, so you cannot use it in date calculations afterward—keep the original date in another column if you need to sort chronologically.
Method 3: Day-of-Year (Ordinal Number) Calculation
If your “ordinal date” means the day number within the year (1 to 365/366), use this formula:
=A1-DATE(YEAR(A1),1,0)
For example, April 15, 2025 minus the day before January 1, 2025 (which is December 31, 2024) gives 105. That’s the 105th day of the year. Excel handles the leap year automatically—February 29 would be day 60 in a leap year, day 59 in a non‑leap year.
If you want the result as text like “Day 105”, use:
="Day "&(A1-DATE(YEAR(A1),1,0))
Method 4: Power Query for Bulk Conversion
When you have thousands of dates and need a repeatable transformation (like adding a day-of-year column), Power Query (Get & Transform) is efficient:
- Select your data range and go to Data → From Table/Range (or From Sheet in newer Excel).
- In Power Query Editor, select the date column.
- Go to Add Column → Date → Day → Day of Year.
- Click Close & Load to put the result back into a worksheet.
This creates a new column with the day number (1–366). It’s a one‑time setup; you can refresh the query if your source data changes.
How to Choose the Right Method
- Display only → use a custom number format. Fastest, keeps date type.
- Need the suffix as text → use the formula in Method 2.
- Need day-of-year for calculations → use Method 3.
- Large dataset or recurring task → use Power Query.
Also consider whether you need the result to remain a date (for sorting/filtering) or if text is acceptable. Text results are fine for labels, but they won’t work in date arithmetic.
Common Mistakes and Troubleshooting
- Mixing up text and date: The formula in Method 2 returns text. If you try to subtract two such values, Excel gives a #VALUE! error.
- Wrong suffix for 11, 12, 13: A simple MOD(day,10) rule would give “11st” and “12nd”, which are wrong. Always include the exception for 11–13.
- Leap year miscalculation: The day-of-year formula automatically accounts for Feb 29, but if you manually multiply month numbers, you’ll be off by one after February.
- Custom format not showing suffix: Excel’s custom formats cannot add “st”/“nd”/“rd”/“th” automatically. You must use a formula.
- Locale differences: If your Excel uses a non‑English date format, the TEXT function’s format codes (like “mmmm”) may need adjustment. Check your regional settings.
Frequently Asked Questions
How do I get “1st”, “2nd”, “3rd” in Excel without a formula?
There is no built‑in Excel format that adds ordinal suffixes. The only way is to use a formula (like Method 2) or a VBA macro. Custom number formats can’t do conditional text based on the day number.
What is the difference between “ordinal date” and “day of year”?
In statistics and some data fields, “ordinal date” is exactly the day of year (1–365/366). In everyday writing, it means a date with an ordinal suffix (1st, 2nd). This article covers both because the term is ambiguous.
Does the day-of-year formula work for leap years?
Yes. The formula =A1-DATE(YEAR(A1),1,0) uses Excel’s built‑in date system, which knows about leap years. For example, March 1, 2024 (a leap year) returns 61, while March 1, 2023 returns 60.
Can I convert an ordinal date back to a regular date?
Yes, if you have a year and a day number. Use =DATE(year,1,day_number). For example, =DATE(2025,1,105) returns April 15, 2025. Note that day 366 only exists in leap years; using 366 in a non‑leap year gives March 1 of the next year.
Why does my TEXT function return “15 Apr” instead of “15th Apr”?
The TEXT function only formats numbers and dates according to built‑in format codes. There is no code for ordinal suffixes. You must concatenate the suffix manually as shown in Method 2.
Is there a way to do this in Google Sheets?
Yes, the same formulas work in Google Sheets. For the suffix, use the same IF/OR logic. For day‑of‑year, use =A1-DATE(YEAR(A1),1,0) as well.