3 Replies Latest reply: Mar 18, 2016 10:43 AM by Cesar Polo RSS

    Why dates are sorted like this...?

    Cesar Polo

      Hi all,

       

      I don't find reason why my dates are not being sorted correctly. I generate the "Fecha" field (which is date in spanish) using the file name and dates functions like this:

       

      date(date#(mid(filename(),5,8),'yyyymmdd'),'mm/dd/yy') AS Fecha

       

      The filename is structured like this: DPF_20160229.xlsx

       

      If you noticed, 01/31/16 comes before 02/29/16, and so on...

       

      I read the most common issue happens when the date is not correctly formated, however I think I'm doing it correctly.

       

      Any help would be appreciated. Thanks a lot.

       

      Untitled.png