Skip to main content

How to convert date to ordinal date format in Excel?

doc date to ordinal 1
As we all known, you can format date as multiple format in Excel, such as 1/1/2016, 1-Jan-16 and so on. However, have you ever tried to convert the date to ordinal date format as below screenshot shown? Actually, in Excel, there is no direct way to format date as ordinal date format. But do not worry, here this article, introduces the tricks on converting date to ordinal date format in Excel.

Convert date to ordinal date format with formula
Convert date to ordinal date format with Defined Function
Convert date to ordinal date format with Kutools for Excel
Convert cardinal number to ordinal number with Kutools for Excel good idea3

arrow blue right bubble Convert date to ordinal date format with formula

Here is a formula can help you convert date to ordinal.

Select a blank cell next to the date you want to convert to ordinal date format, C2 for instance, and enter this formula
=DAY(A2)&IF(OR(DAY(A2)={1,2,3,21,22,23,31}),CHOOSE(1*RIGHT(DAY(A2),1),"st","nd ","rd "),"th")&TEXT(A2,"mmmm, yyyy")
and then press Enter key, and drag the autofill handle over the cells you want to convert date to ordinal. See screenshot:
doc date to ordinal 2

Now the dates have been converted to ordinal dates.

Note: In the formula, A2 is the date you want to convert to ordinal date, you can change it as you need.


arrow blue right bubble Convert date to ordinal date format with Defined Function

Moreover, you also can apply Defined Function to convert standard date to ordinal date.

1. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below code to the script.

Code: Convert date to ordinal

Function OrdinalDate(xDate As Date)
'UpdatebyExtendoffice20160705
    Dim xDay As Integer
    Dim xDayTxt As String
    Dim xMonth As Integer
    Dim xMonTxt As String
    Dim xYear As Long
    
    xDay = Day(xDate)
    xMonth = Month(xDate)
    xYear = Year(xDate)
    
    Select Case xDay
        Case 1: xDayTxt = "st"
        Case 2: xDayTxt = "nd"
        Case 3: xDayTxt = "rd"
        Case 21: xDayTxt = "st"
        Case 22: xDayTxt = "nd"
        Case 23: xDayTxt = "rd"
        Case 31: xDayTxt = "st"
        Case Else: xDayTxt = "th"
    End Select

    xMonTxt = Switch(xMonth = 1, " January", _
                     xMonth = 2, " February", _
                     xMonth = 3, " March", _
                     xMonth = 4, " April", _
                     xMonth = 5, " May", _
                     xMonth = 6, " June", _
                     xMonth = 7, " July", _
                     xMonth = 8, " August", _
                     xMonth = 9, " September", _
                     xMonth = 10, " October", _
                     xMonth = 11, " November", _
                     xMonth = 12, " December")
    OrdinalDate = xDay & xDayTxt & xMonTxt & " " & xYear
End Function

doc date to ordinal 3

3. Save the code and close the VBA window, go back to select a cell which will place the converted date, and enter this formula =OrdinalDate(J2), press Enter key, then drag fill handle overt the cells you need. See screenshot:
doc date to ordinal 4

Tip: in the formula, J2 is the date you want to convert to ordinal date, you can change as you need.


arrow blue right bubble Convert date to ordinal date format with Kutools for Excel

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

In Kutools For Excel’s Formula Helper tool, you can use the Convert date to ordinal date feature to quickly change Excel date to ordinal.

1. Select a cell that used to place the ordinal date, click Kutools > Formula Helper > Date & Time > Convert date to ordinal date.
doc date to ordinal 5

2. In the Formulas Helper dialog, choose or type the cell reference into Date section, in default, the cell reference is absolute, please change it to relative if you want to auto fill the formula to other cells by using auto fill handle.
doc date to ordinal 5

3. Click Ok. Now the date has been changed to ordinal date. Select the result cell and drag auto fill handle over the cells to apply this formula.
doc date to ordinal 5


arrow blue right bubble Convert cardinal number to ordinal number with Kutools for Excel

In most of cases, you may want to convert numbers to ordinal numbers when you are ranking. In Excel, there is no built-in function can handle, but if you have Kutools for Excel – a handy add in tool, its Convert Number to Ordinal utility can do a favor for you.

Select the numbers you want to convert to ordinal, and click Kutools > Content > Convert Number to Ordinal. See screenshot:
doc date to ordinal 5

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Date ordinals are confusing and wrong to use, especially in the monthly sense. This anomalous usage is very alien to native users of English, is erroneously used only in certain areas. If we do use them, the correct usage is 'nth day of month', which is how it was originally meant. So, 5 October is correct, and so is October 5. But 5th October is wrong unless it includes the 'day of' part: 5th day of October. 5th October can also mean the 5th October from this year: which means the October 5 years from now!
This comment was minimized by the moderator on the site
Hello. Your VBA code works fine. I have one question can you tell me what I have do to get the first 9 numbers in a two-digit-look? 1st to 01st, 2nd to 02nd aso. I have no idea from VBA thx in advance Phenox
This comment was minimized by the moderator on the site
Sorry I did not understand your question clearly. You mean to convert first 9 numbers(123...9) to two digits(010203...09), not in date,only the numbers? Or convert the date such as 1/1/2001 to 01st Janaury 2001?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations