# Inserted numbers (dates) from a text editor, the dates are sorted incorrectly

I have imported a table column with the following numbers from a text editor

```
06 2010
01 2012
01 2011
```

I use: Menu -> Data -> ”Text to Columns” -> set the Column Type to “Date (DMY)"

Then I format the cells to User-defined MM YYYY (I want to retain the format)

Then I try to Sort Ascending – and got this result:

```
01 2011
01 2012
06 2010
```

As you know it should have been:

```
06 2010
01 2011
01 2012
```

Where did I go wrong / what did I misunderstand?

The same link as presented in one of your previous questions regarding time http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1017886_715980110 explains what dates are in Calc (ODF). Thus sorting dates in calc is in fact the same thing as sorting numbers (dates are stored as an integer, where the number represent the days since 1899-12-30, which is day 0). You may check, whether Calc recognizes your data as dates, if you temporarily format as numbers and check whether they show up as an integer (

`TODAY()`

is 43764, the 43764th day after 1899-12-30; Tomorrow this info will be deprecated;-)).If the data don't sort correctly your "dates" are (besides talking about bugs) in fact no dates according to the ODF format specification... when assuming you (or better: LibreOffice) magically can recognize and convert something like

`06 2010`

into a correct date by just telling column type “`Date (DMY)`

"