The code below extracts position 3 to 7 from a date (i.e. it returns 14-12 from the date 2014-12-02).
When sorting, the result is mixed up and regardless of if I sort numerically or alphabetically it doesn't work (picture).
The thing is also that the same code was used in Qlik View and the sorting worked well there.
Any one has an idea?