sorting german style date

Hi all,

i have a slight problem sorting my date. Since i live in germany our date goes by dd.mm.year.
In the script i set the coltype to “ed”. The mysql date field is varchar(10).
setColSorting is set to “int” because it wont reconize “date”, because its not in mm/dd/year.

Can someone help me with this? Will i have to modify something, so it will reconize dd.mm.year?

Cheers

tyr0n

Do you set your Date using the integrated method:

mygrid.setDateFormat("%m/%d/%Y");

This work in my code…

setDateFormat works only for dhxCalendar columns, in case of other column types - it can be solved by using a custom sorting

Hey Stanislav,

what would this custom sorting be?

Greetings

tyron

Please check tutorial here docs.dhtmlx.com/doku.php?id=dhtm … me_sorting

Thanks Olga,

but it isnt working yet :frowning:

[code]

[/code]

am i doing something wrong? Do i have to modify the function?

greetings tyr0n

Code looks correct.

Be sure that you are using pro version of dhtmlxgrid, because only pro version supports custom sorting methods.

Hello, I am having a similar problem on my German domain. The code I have imported for a German date is:

mygrid.setDateFormat("%d.%m.%Y");

But the grid is still wrong.

Please, make sure that you are using the dhxCalendar/dhxCalendarA column type in your grid.