Bug 98081 - sort does not work
Summary: sort does not work
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-22 13:45 UTC by John
Modified: 2016-03-31 14:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet with problem attached (3.84 KB, text/csv)
2016-02-22 13:46 UTC, John
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John 2016-02-22 13:45:33 UTC
User-Agent:       Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier: LibreOffice 4.4.7.2

I tried to sort the small spreadsheet by col 1 ID and by col c donation date;
note in col 1 lines 27 -32 are not sorted;  and in col c, lines 14, 15 and 25,26 are descending dates while others are ascending.
At first I encountered date errors but noted that some dates were _x/dd/yy and others were mm/dd/yy so I entered 0 as the first digit for those months, but that did not work

Reproducible: Always

Steps to Reproduce:
1. sort the spreadsheet by col 1 and then by col c ascending
2.
3.
Actual Results:  
described above

Expected Results:  
strings and dates all sorted in same way

[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes


Reset User Profile?No
Comment 1 John 2016-02-22 13:46:27 UTC
Created attachment 122869 [details]
spreadsheet with problem attached
Comment 2 John 2016-02-22 13:53:57 UTC
the problem in col 1 is that the value was copied down into the next rows for multiple entries and the value incremented (see my other bug report regarding copies being incremented)   
the date sort still does not work
Comment 3 Buovjaga 2016-02-28 16:18:24 UTC
I noticed the dates were formatted as Number by default.

I formatted them as Date.

When I started to edit them, I saw:
'08/7/2009

I removed the ' and everything was ok.

I searched and found this: https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=22539&start=0

This fixed them:

How to convert numeric text to number by re-entering everything in one step.
Select the cells in question (col C).
Apply Eng US Date format MM/DD/YYYY
menu:Find&Replace...
[More Options...]
[X] Current Selection
[X] Regular expression
Search: .+ (a dot and a plus)
Replace: &
[Replace All]

Now you have proper dates in the column.
Comment 4 Buovjaga 2016-03-03 13:30:15 UTC
Closing as notabug. CSV format limitation.