Why doesn't Writer remember my custom-format date field? (Footer, Header)

L.O. version 6.4.3.2 — default format is MM/DD/YY — desired format is YYYY (i.e., the 4 digits of the year)

EDIT ebot_20200524_19.50-MEZ - Taken from the too long heading.

— OK. So how do I edit the details? I clicked “Edit” beside the question, and all I can change is this question. You asked for more details.

(Maybe I’m beginning to understand how to ask questions here.)

I am trying out LibreOffice (LO) after using OpenOffice (OO) for years. I am able to open documents created in OO, and for the most part they appear as I want them to appear.

However, the date field (not fixed) always appears in the default format of MM/DD/YY every time I open the document. The field is in the document footer and appears on every page. I change the format to YYYY through the menus, save the file, and close it. The next time I open the file — MM/DD/YY.

I now suspect that the problem is in the porting of the document from OO to LO. I created a test document in LO from scratch, and it appears to retain the date format to which I set it. That said, I deleted the date field in my OO-created file and re-inserted it using LO’s menus. YYYY still becomes MM/DD/YY.

Thanks.

(2020-05-25) Thank you again. The attached file has the errant date field formatting issue.
dateFieldTest.odt

(2020-06-16) Regarding the recommendation (via an automated email) that I update the question with key words, it appears that someone already did. If there is more to be done in this regard, please provide the text and I will update the question accordingly.

1 Like

Well, well, well, … What can we guess from that? My crystal ball is in the shop for maintenance. So, please, read these guidelines, then edit your question to tell where you are using a date and how this date is entered (copy/paste from another application, a field, a link, manual entry, …?).

Don’t use an answer, this is not a forum. Answers are reserved for solutions.

@edf: Editing the question here means: add more details. You were able to add a comment sentence. You should be able to explain what you are trying to achieve (e.g. I want to display the document last-changed date in the cover page) and how you are presently doing it (e.g. I manually type the date – of course, this is not what you’re doing otherwise you wouldn’t ask).

Please edit in the right place.

@Hrbrgr: Danke schön. I hatte nicht verstunden wo das Edit geschah.

@ajlittoz, alles gut. :grinning:

@edf: Since you edit with LO, your doc becomes a LO-XML when saved. It should then behave like the brand new one.

Please attach a 1/2-page sample file to your question (edit it and use the paperclip tool), provided the sample still shows the problem.

I cannot confirm the described behavior.
Were your documents saved to files in an alien (hostile) format (during their CV)?
Can you privide (upload) an example document showing the issue for you?

Just made an example with my oldest OOo (V3.2 from SUN times), doc language set to en-usa with date in a footer formatted to USA default (with chills). Then I saved it to the .odt (1.1?) format of that time, opened it with LibO 6.4.3, changed the foramt to ISO 8601, closed the file, and opened it again. The newly well formatted date had preserved this format.

If I can figure out how to upload it, the file will be one that exhibits the problem of the errant-format date field on my machine. Also, fwiw, I was using OO v. 4.1.7 prior to trying out LO.

(…I am not seeing how to upload the file, so you will have to help me out a bit more. It might be tomorrow as I must do some other tasks yet this evening.)

@edf: edit your question, this activates the writing/editing box. At the top of it there is a toolbar with a row of icons. One of them is a paperclip. Click on it. A small dialog appears with a Browse button. Push this button and you can choose a file on your computer.

Or so: How do I attach a file to my question/answer? :grinning:

If I open the attached file and format the contained date field to ISO 8601 this change persist over save/reopen. This with Libo versions 6.4.3 anf 7.0.,0.0.alpha1.
I need to reopen the file tomorrow again to see how it behaves when the value needs an update.

With LO 6.4.3.2 under Fedora Linux 32, I have the same problem. Enquiring.

As announced above I tested the files with the datefield reformatted yesterday (2020-05-25) to YYYY-MM-DD now (2020-05-26) and the field was correctly updated without changing the format back to the previous one (M/D/YY). This was checked for 3 files prepared yesterday with different versions of LibO and AOO under Win 10.
I definitely cannot reproduce the issue. I also can hardly believe that the behavior insofar is OS dependent. (Yes @ajlittoz is credble, of course.) Might the background be a user profile corruption?

I had studied the thread and reported the respective bug when I had learned what what versions it actually occurred. (See my answer below.)
Now I wanted to come back and had difficulties to find the topic with the built-in serach.
Therefore:
Please make sure that the subject contains the relevant keywords without grammatical distortions.
It may look/sound less pretty then, but being forced to use this inapt software, we need to mind the functionality we can get nonetheless.

From experimenting, it looks like LO does not like “component” formats like DD, MM or AAAA in your document or a blank one where your text is pasted.

My configuration is: LO 6.4.3.2 under Fedora Linux 32.

If I try these custom formats in a brand new document from scratch, it works.

I tried to compare the XML between your original and a pasted doc, but I see no difference but for custom date formats. Those look correct in my limited knowledge of ODF.

I can’t make up my mind between some “twist” in document encoding (a subtle difference between OO and LO) and a plain ol’ bug in LO.

See tdf#133459.

===Edit 2020-06-16 about 12:30 UTC===
The bug was fixed meanwhile. The fix is announced to work in V 6.4.6 or higher.

For users needing an immediate solution: Downgrade to V6.2.5. The bug was introduced later.

I had the same behaviour in 7.2.3.2 (on arch linux), both in older .odt files when I open them, as well as for a new file.
I can also reproduce it by creating a new file, insert a date field, set the format is to 1999-12-31 and save. After re-openening the file the field looks like 12/31/1999

This changed with an update on my arch linux system in Oktober, I can see this from PDF files of invoices sent. Clients are now complaining about the date format not being recognised by their bookkeeping software…

If instead of selecting 1999-12-31 as the format from the list, you select “Additional formats …” and type YYYY-MM-DD and then save and re-open, the format is preserved after saving.

FWIW I have set LANG=en_DK.UTF-8 in my environment.

I never knew that there was a locale setting en_DK. Funny. What for?
Is it Greenland related? If so, it looks “sensible” in the strange sense humans use the word that default format settings are conforming with the funny US customs. The 4-digit-year, however, doesn’t back the idea.
I am running (in Germany) an en (UK) UIin en (UK) locale, but made en-DK my language setting for a test document. I didn’t get the issue tis way. with LibO 7.2.3.2.
Well, it may depend on the UI (which I wouldn’t like to change), or there can be a flaw in your user profile.
If you wouldn’t like to rely on your workaround,and would also want to “repair” existing documents in a kind of batch job, I could provide you with a format harmonizer for dates and times implemented by user code in Basic. There is also such code for the conversion of date fields to ordinary strings.
Tell me if you want to try it.

===

There may be a rather strange bug causing your issue. Bugs are reported to bugs.documentfoundation.org.