How do I change the default date/time format?

I prefer to use the default date of MMMM/DD/YY, (written as January 23, 2018), and the time of HH:MM:SS AM/PM.

I click on the Insert Field button, and I have to manually change the date and time format every single time, which I find very annoying. I can’t find anywhere on how I am supposed to change it to default. There should be a way to change it to default, because now when I insert the time field it’s formatted as HH:MM:SS (24hr)

I am trying to do this on LibreOffice Writer on version 5.2.7.2 with the build ID of 1:5.2.7-1+rpi1+deb9u3

I hope they implement this.

@minipax There is already a workaround. See my answer below.

The default formats (date/time, currency, fixed/scientific/percent; in long/medium/short variants where applicable) depend on cell/field/… language, and are hardcoded in the corresponding locale data (see i18npool/source/localedata/data for the locale data definitions). They are not configurable (unless you rebuild LibreOffice).

You may want to create a macro to automate insertion of fields with desired format; please see this question for details.

This is a bug, and should be fixed. Of course if I enter it as bug into bugzilla, it will be reclassified as a feature request. Then, after a while, it will be classified as “won’t fix.” Welcome to LibreOffice!

1 Like

Create your own cell style(s) for dates and times to override the default. You may want to do the same for currencies, text cells and measurement units. Store these stlyes in a template and make it your default templates.
Styles can be assigned to keyboard shortcuts.

1 Like

As always when it comes to such “pinpoint” items in Writer, you have to resort to AutoText.

  1. insert once manually the field and format it the way you like
  2. select the newly inserted and formatted field and Tool>AutoText
  3. give it a name and a shortcut
  4. save as new AutoText item (don’t as “text only” as it won’t record the formatting)

When you want to insert the field with its formatting, type the shortcut and F3.

I have done this and it works. Ir there a way to make it into a macro and then into a keyboard shortcut? I also have it saved as a template.

Can you explain for what reason you think to need a macro and a shortcut to call that macro if you already have the shortcut (1 or 2 letters mostly) for the AutoText entry and the F3 functionality?

In a previous version of Libre I have KB shortcuts for current fixed time and date. Command d and command t. In the newest version, it is not fixed so the time changes, or I have to double-click the field and change it to fixed.

I made an auto text with the fixed field, so I type d and press fn and F3 to insert the field. I was looking to streamline the process by making it a keyboard shortcut that I was using before.

Ultimately, if I could change the field that is inserted as time to fixed, that would be preferable. Also, if the date field could be changed when inserted to NNNNMMMM D, YYYY that would be nice also.

I am running macOS Ventura 13.6 with Libre 7.6.1.2

I hope some of this makes sense.

Regarding field contents (fixed vs. varying) and its formatting (NNN MMM D, YYYY), do this when you create your AutoText. What you configure at this time will be reproduced systematically when you insert the AutoText.

AutoText is invoked with kbd>F3. It may look slower to press 1 or 2 keys for the AutoText name then F3, but is it really?

Remark: I use more frequently the function keys than the “hardware controls” like volume up/down, screen switch, backlight up/down. I then configured my laptop keyboard so that the Fn references these “hardware controls” and the function keys are invoked without modifier. You can do this in the BIOS.

This is no longer about a “default date/time format”, but about the related questions/comments by @FaithfulScuff. My comment should be moved to a respective new question focussing on the insertion if one will be.
What you seem to want is a really weird format, but it works for me flawlessly for TextField instances of type Date (fixed).
Always fix with LibO V7.6.1.2 also when copying and pasting and over save/load.
(I have no Mac,)
Concerniong your shortcut issue:
There seem to be two fractions among the users: Some prefer dates “fixed”, some “variable” (strange to me). For now the second fraction has won. The other fraction doesn’t simply give in …
Anyway the keyboard “custmisation” (shortcut setting) has only one Date entry under Insert which selects the application default (now variable), and no formatting options. Tell me if I’m wrong. IMO the setting is of no use anyway therefore.
If you are decisive about solving your problem macro-based, you find usable suggestions in the code contained with the attached example and the related custimisation setting for the document.
Of course you need to move things to the application scope if they shall work there genertally.
nextAttempt.odt (56.5 KB)

Thank you Lupp and ajlittoz for the answers. Autotext is set to fixed, and I have changed the function key settings to use the functions. I do use volume a lot, so I put it in the menu bar. I am journaling, so the date and time should be fixed for each entry.

I believe there should be a way to set the format to the options available in the keyboard shortcut options. I sent a feature request to libre, maybe they will consider it in the future.

Thanks again for the input.