Why does the date format change when I overwrite a cell?

I am using 6.2.5.2 and have a spreadsheet where one cell is in the date format MM/DD/YY. If I enter a new value, it displays correctly (eg. 09/05/19), but if I overwrite it, it displays as 09/05/2019. Why is it doing that?

Do you mean going to cell edit mode (double click into the cell, to change a value) by using the term overwrite ?

Yes. I enter a new value in the cell and the format changes.

Please do not use Answer on this site, if you actually don’t answer a question but responding to a comment. Use add a comment for that purpose or edit your original question to add more detailed information. Thanks in advance …

Hello,

the format doesn’t change at all. You’ll notice, that after you have finished your edit, that the date will display as per your format immediately after you’ve left the cell edit mode by having pressed ENTER. You need to understand that neither a value ‘MM/DD/YY’ nor ‘MM/DD/YYYY’ (or anything else) is stored in the cell, but an integer number. Your format definition in no way determines what is being stored. It only determines how it is displayed. Play around with various formats and change them to numbers, and you’ll see what I mean. And in edit mode a data presentation, which fits to your localization, is being chosen for the input.

The format definition also in no way determines how your input will be interpreted (which means how it is converted to a number). This is solely determined by your localization settings. Try and format DD/MM/YY and enter in MM/DD/YYYY and you’ll get confused.

the format doesn’t change at all

Yes it did in the case of the bug I mentioned.

Probably tdf#126116 which is fixed for 6.2.6.