Bug 88769 - Improper SORTING on the date field for certain date formats
Summary: Improper SORTING on the date field for certain date formats
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 88768 (view as bug list)
Depends on:
Blocks: Sorting
  Show dependency treegraph
 
Reported: 2015-01-24 09:04 UTC by Jacques
Modified: 2023-04-06 16:27 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques 2015-01-24 09:04:38 UTC
OS is Windows 8
Platform: 64 bits

Sorting does not function properly with a date format like day. 01 jan. 1999
Changing the format to 1/jan/1999 eliminates the problem.

The file I am working on is an Excel file I opened with Calc (and for which I am keeping the .xlsx extension).
Comment 1 raal 2015-01-24 09:28:10 UTC
*** Bug 88768 has been marked as a duplicate of this bug. ***
Comment 2 QA Administrators 2016-02-21 08:34:59 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2017-03-06 15:06:24 UTC Comment hidden (obsolete)
Comment 4 krafczyk.matthew 2017-03-18 19:58:34 UTC
This bug is still present on branch 5.4.0.0.alpha0+ on linux.

To reproduce, open a new Libreoffice Calc doc and enter the following table:

     A        |       B
------------------------------
2017 31 Jan   |       A
2017 10 Feb   |       B
2017 20 Mar   |       C
2017 01 Apr   |       D

Select the 4 cells of column A, and navigate to the 'Format' menu and select 'Cells...'.

Then set the format to Date and enter the format 'YYYY D MMM' pressing the check mark to add the format and set the format of those cells.

Now select all the 8 cells between column A and B and select 'Data' and then 'Sort...'. Then set 'Sort Key 1' to 'Column A' and select either Ascending or Descending.

You will find that the cells are sorted as if they were strings rather than dates.
Comment 5 Xisco Faulí 2017-06-12 12:01:57 UTC
Changing version back to the earliest affected version.
Comment 6 Bruno 2017-08-08 21:12:43 UTC
(In reply to krafczyk.matthew from comment #4)
> This bug is still present on branch 5.4.0.0.alpha0+ on linux.
> 
> To reproduce, open a new Libreoffice Calc doc and enter the following table:
> 
>      A        |       B
> ------------------------------
> 2017 31 Jan   |       A
> 2017 10 Feb   |       B
> 2017 20 Mar   |       C
> 2017 01 Apr   |       D
> 
> Select the 4 cells of column A, and navigate to the 'Format' menu and select
> 'Cells...'.
> 
> Then set the format to Date and enter the format 'YYYY D MMM' pressing the
> check mark to add the format and set the format of those cells.
> 
> Now select all the 8 cells between column A and B and select 'Data' and then
> 'Sort...'. Then set 'Sort Key 1' to 'Column A' and select either Ascending
> or Descending.
> 
> You will find that the cells are sorted as if they were strings rather than
> dates.

Same on V5.4 Win with Date format dd.mm.yyyy. Doesn't sort like a date but just alphabetically.
Comment 7 QA Administrators 2018-08-09 02:35:56 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2020-08-09 04:08:19 UTC Comment hidden (obsolete)
Comment 9 Keith Gray 2020-11-18 09:43:12 UTC
This bug still exists... Date Format: dd/mm/yyyy
Sort by Column A ascending...

01/11/2010 comes before
02/10/2010
Comment 10 QA Administrators 2022-11-19 03:36:07 UTC
Dear Jacques,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug