Why will Calc not sort my ODT file by date?

I have an eleven columns ODT file. First column is a subject, and second one a date. When I select the rows that I want to sort, and ask to sort them by date in ascending order (second column), nothing happens. What am I doing wrong?

The sort function in an odt table works only with:
-Alphanumeric
-Numeric
key types.

Thus a normal date format will not work. However, if you use the Japanese format: yyyy-mm-dd (mm = numbers)you can sort. This date format is in the odt-table looks like a Japanese date format but is not a real date format. It is only an alphanumeric string.


EDIT after comment from @GilB

1- What I explained above worked for me. I made a test using the date “format” you mentioned as"2014-06-13" even the format yy-mm-dd worked fine.

2 - I also made a new test and formatted the date column really with a date format (Select column > right click > number format > selected date format yyyy-mm-dd and mm/dd/yyyy. Whatever format I use, the sorting is correct using “alphanumeric” or “numeric” sorting. It seems that Writer is using the date value displayed in a date format.

2 - I am afraid I don’t understand sufficiently the conditions in which your table right now is.
You mention merged cells;depending on how they are merged the table cannot be sorted. This is a general matter of tables thus independent from Writer. I would first try to get the table structure “cleaned up” by copying the table into Calc, this should also solve the problem of potentially merged cells. If the Calc table is OK, I would go back to Writer and pasting the Calc table in html format.

Thanks for the fast answer!

The date format was for example 2014-06-13. To make a test, I modified it for 4 rows to yyyymmdd.

But still, nothing works. A message tells me that “the rows containing fusionned cells are not sorted if they are formated”. And this is the case because columns F, G, H, I are fusionned. And the text is formated : justified. It needs to be because the text has many lines and that is the only way to be able to read it in a good format. Will I have to eliminate the formating or is there another way to proceed?

I removed the cell fusion. I removed the formatting. And it works.

The problem is that I have more than 100 rows were the formatting and cells fusion will have to be removed… No better way to do that?

yyyy-mm-dd is not (just) the Japanese format, it is the ISO 8601 full date format :slight_smile:

@bencomp - Thanks for the ISO information! I never looked at ISO statements, just know this date format from daily life and got to like it when working with file names. The ISO information made me curious and here is a wikipedia link for others who are interested: ISO 8601 - Wikipedia

… And everyone should feel invited to propagate usage of ISO 8601 for dates everywhere in everyday life. Country specific and regional date formatting is extremely error-prone and may even cause serious damage here and there. Thanks to the Japanese for introducing the format into everyday use. German DIN standards tried the same by a regulation for business letters some time ago but did not succeed. Let’s hav a second approach!

Interesting to read the the German DIN standard tried to introduce it for business letters as well. My own experience in international communication including German companies shows that the yyyy-mm-dd is typically always understood. ---- I would not be surprised if the origin of the ISO 8601 format goes back to the traditional Japanese calender which the same except for the year 2014 = HEISEI26 = 26th years of the reign of the current emperor: e.g. 2014-06-21 = 平成26年6月21日

As for the usage of a date format, everybody should be happy with his own preferences.

You ae welcome, ROSt52. A respectable attitude. Dare I like international standards avoiding misunderstandings and sometimes damage? Having ones own preferences eventually may cause loss of some hundred million dollars. (http://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failure again, there were other examples, though). It’s a fine thing understanding everyone without studying Imperial units may they be English or Japanese. Nostalgics may have their evening.

@Lupp - “Mars Climate Orbiter” what an incredible example! I was educated in metric units and was very happy to see that daily life, science and technology is based on metric units. The Japanese use only a few traditional units for very traditional items: a bottle of sake, measure in Japanese style rooms. Size of rooms, apartments etc are typically double indicated in square meters and tsubo, the traditional unit. Let me stop here because I feel we are drifting away from LibO - and I don’t feel the need to have these few traditional units in LibO.