How to Create a Word Date Field with an Ordinal Day Format
Question details
The user needs to dynamically generate dates with ordinal suffixes (e.g., "22nd of January 2022") rather than standard date formats.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Formatting legal documents that strictly require dates to be written out with ordinal suffixes and specific month/year structures.
- Observed behavior
- Standard Word date fields do not natively append ordinal suffixes dynamically, requiring workarounds like scripts or nested fields.
Before proceeding, ensure your document is saved and that you have enabled the Developer tab and macros if you choose to use the VBA automation method.
Use a VBA Macro to Format Selected Dates
This method automatically converts any selected standard date into a fully formatted ordinal date, correctly handling exceptions like the 11th, 12th, and 13th.
Since Word does not include a native date field format for ordinals, using a short Visual Basic for Applications (VBA) script is the most reliable way to format dates in legal documents without wrestling with complex field codes.
In your Word document, press Alt + F11 on your keyboard to open the Visual Basic for Applications editor.
In the left-hand Project pane, right-click 'Normal' (or your document name), then select 'Insert' > 'Module' to create a blank script window.
Copy and paste the following VBA code into the module window: ```vba Sub OrdinalDate() Dim rg As Range Dim dt As Date Dim outStr As String If Not IsDate(Selection.Text) Then MsgBox "Please select a date and try again." Exit Sub End If Set rg = Selection.Range While Not IsNumeric(rg.Characters.Last) rg.MoveEnd wdCharacter, -1 Wend dt = CDate(rg.Text) outStr = Day(dt) Select Case Day(dt) Case 11, 12, 13 outStr = outStr & "th of " Case Else Select Case Right(outStr, 1) Case "1": outStr = outStr & "st of " Case "2": outStr = outStr & "nd of " Case "3": outStr = outStr & "rd of " Case Else: outStr = outStr & "th of " End Select End Select outStr = outStr & MonthName(Month(dt)) & " " & Year(dt) rg.Text = outStr End Sub ```
Close the VBA editor and return to your document. Highlight a standard date (e.g., "1/22/2022"), then press Alt + F8, select "OrdinalDate", and click "Run" to instantly format it as "22nd of January 2022".

Use Advanced Nested Field Codes
Builds a highly customized, auto-updating date field using nested formula fields for users who prefer to avoid macros.
Format Legal Documents Efficiently in WPS Writer
WPS Writer offers comprehensive tools to insert, format, and customize date fields for complex legal documents. With full VBA macro integration, seamless compatibility, and a highly intuitive interface, automating document formatting is fast and hassle-free.
- 1. Download and Install: Get WPS Office for free and open WPS Writer on your device.
- 2. Open Your Legal Document: Open your existing .docx files directly. WPS Writer perfectly preserves all your original layouts and fields.
- 3. Utilize Developer Tools: Navigate to the Developer tab to insert custom date fields or paste the provided VBA macro to instantly apply ordinal date formatting.

Frequently Asked Questions
Why doesn't Word include ordinal dates by default?
Standard date field formats follow common numeric patterns universally required across international standards. Ordinals (like 1st, 2nd, 3rd) are generally considered stylistic phrasing and require custom formulas, field nesting, or VBA scripts to generate dynamically.
Does the custom date field update automatically?
If you build the ordinal date using nested field codes (inserted via Ctrl+F9), it will update automatically when the document is refreshed, opened, or printed. However, if you use the VBA macro on selected plain text, it acts as a one-time conversion and must be run again if the underlying date changes.
Can I format the ordinal suffixes as superscript?
Yes. If you use the VBA macro method, you can add an additional line of code to select only the generated two-letter suffix (such as 'st' or 'th') and apply the superscript font property to that specific range.




