Ordinal Dates in LibreOffice Text Document

In my line of work, we often format dates with a bit of formality: This 4th day of July, 1776. Getting that to automate in LibreOffice required me to hit the documentation.

First, Insert Field Date. You’ll get something like 07/12/22. Right-click the inserted date and select Edit Fields...

In the Edit Fields window that pops up, in the Format pane, find Additional formats... at the end, and click it.

In the Format Number window that pops up, insert your own Format Code:

  • [NatNum12 ordinal-number]D ... for the day of the month, with the ordinal (4th, 31st, ...)
  • MMMM, YYYY ... for the month (January, July, ...) and the four digit year.


This is roughly equivalent to using \*ordinal in Microsoft Word:



Note that LibreOffice only has two “Date” fields, floating and fixed. If you want to tie a date field to a specific event, you’ll have to dig a bit. For instance, for the date a document was printed:
Insert Field More Fields... and then in the Fields window, under Doc Information, in the Type pane select Last printed and, in the center ("Select") pane, Date. Setup Additional formats... as detailed above. You won’t actually see anything there, until the document is printed:
 

As soon as you hit Print, though, those fields will populate:
 

Comments