1
0
-1

Hello,

I'm having an issue when sorting a datalist using a date column. The sorting appears not to be considering the datetime to perform a chronological sorting but the string value and performs an alphabetical sorting (hence using only the "day" part in my case).

Am I missing something?

Thanks for the help

Baptiste

  1. Camilo A. García

    Hello, in principle, I think it depends on the format of the value you're putting in the column. The data source of the table is JDBC? or is it directly a form?

CommentAdd your comment...

2 answers

  1.  
    3
    2
    1

    OK Solved.

    When using JDBC, it is necessary to use STR_TO_DATE(field, "format") to ensure that the column is a date.

    Thanks for the insight Camilo.

    Cheers

      CommentAdd your comment...
    1.  
      1
      0
      -1

      Hi Camilo, Indeed it is JDBC! I get the point. Because everything is "string" in the database, it cannot know it is a date field. Is there a workaround with JDBC or should i use only form source? Thanks a lot, Baptiste

        CommentAdd your comment...