Cannot change format of date column in form table control

Summary

I have created a database which a single table containing a date column. Using the Form Creation Wizard I have created a form for inserting and modifying records in this table. The form contains a single table control.

I would like to change the format that the table control uses to render the date column. Specifically I want to render the dates using the format YYYY-MM-DD. Unfortunately, regardless of what I try, the form always renders the date column using the format MM/DD/YY.

I have tried to detail the steps for reproducing a minimal example of this issue below. I would greatly appreciate if anyone could let me know if I’m doing something wrong or if there is a workaround to my issue.

I have included details about the LibreOffice version I’m using at the end of this writeup.

Thanks in advance for any help.

Note about images:

I tried to include screenshots in the section below but I received a message stating that new members are limited to one embedded file. I don’t think the images are critical to the reproduction steps, but they do seem useful. Therefore, if allowed, I will try to post them in follow-up messages in this thread for reference. I apologize in advance if this creates any issues and please feel free to delete or remove them if that’s the case.

Steps for reproducing minimal example

First I created a new database named “example_db.odb” with a single table named “dates”. The table has two columns, id and date as shown in Image 1 below. I set the Field Format of the date column to YYY-MM-DD.

[Image 1 would go here]

Next I created a form named “dates” using the Form Creation Wizard. The form contains a table control with columns that correspond to each column in the “dates” table. Image 2 below shows the form in Design mode.

[Image 2 would go here]

In the Design mode I right-clicked on the “date” column and selected “Column…”. This opened the “Properties: Date Field” dialog. In the dialog I changed the “Date format” option to YYYY-MM-DD. Image 3 below shows the dialog after I made this change. I closed the dialog and saved the form.

[Image 3 would go here]

Next I closed the Design mode and opened the “dates” form in the Working mode. Image 4 below shows the form in Working mode.

[Image 4 would go here]

I then right-clicked on the “date” column and selected “Column Format…”. This opened the “Field Format” dialog as shown in Image 5 below. Interestingly “Category” was set by default to “Number” rather than “Date”, and “Format” was set to “General”.

[Image 5 would go here]

I changed “Category” to “Date” and “Format” to “1999-12-01” as shown in Image 6 below. (“Format Code” automatically changed to YYYY-MM-DD.) I then pressed “OK”.

[Image 6 would go here]

At this point, I wanted to verify that the changes I made were saved so I again right-clicked on the “date” column and selected “Column Format…” to open the “Field Format” dialog. Concerningly “Category” was set to “Number” and “Format” was set to “General”, suggesting that my most recent changes to the “Field Format” dialog did not persist. I have repeatedly tried to change “Category” and “Format” but the changes never seem to persist.

Next, to test the form I entered 2024-01-02 into the “date” column of a new rown in the table control. However, after clicking away, the form automatically changed this value to 01/01/1800 as shown in Image 7 below. I assume that the form did not recognize the date format I used and, as such, defaulted to the minimum allowed date.

[Image 7 would go here]

At this point I wanted to see what data was actually entered into the database so I opened the GUI for viewing the data in the “dates” table. As shown in Image 8 below, the date 1800-01-01 was saved in the first row of the table.

[Image 8 would go here]

Next, I tried to create a new row for the “dates” table using the GUI for viewing the data in the “dates” table. I entered 2024-01-02 into the “date” column of a new row in the table. After pressing Enter a new row was created with a date of 2024-01-02, as expected and as shown in Image 9 below.

[Image 9 would go here]

Finally, I wanted to see how the “dates” form would render this newly created row with the 2024-01-02 date, so I opened the “dates” form in Working mode again. As shown in Image 10 below, the form renders the date in the second row as 01/02/24 suggesting that it is using the format MM/DD/YY rather than YYYY-MM-DD.

[Image 10 would go here]

Version details

Version: 24.8.1.2 (AARCH64) / LibreOffice Community
Build ID: 87fa9aec1a63e70835390b81c40bb8993f1d4ff6
CPU threads: 8; OS: macOS 14.2.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_MX.UTF-8); UI: en-US
Calc: threaded

Image 1

Image 2

Image 3

Image 4

Image 5

Image 6

Image 7

Image 8

Image 9

Image 10

It’s bug 126941. Use a formatted field instead of a date field. It will work.
But: You couldn’t use the calendar for choosing a date with the formatted field.