setDateFormat for server-side


I tried to set the format date from my grid:

gridUser.setDateFormat("%d-%m-%Y %H:%i");

From database, I have format:

Y-m-d H:i

The problem is in my grid the ‘start_date’ column it’s empty.
When I’m editing in cell, I see the calendar, I can choose the time and date and I see it in the expected format:

%d-%m-%Y %H:%i

How can I make ‘start_date’ column to return the date in the expected format?

You can change above code like next

gridUser.setDateFormat("%d-%m-%Y %H:%i", “%Y-%m-%d %H:%i”);

first parameter will define format for rendering in grid, second - format which need to be parsed from the xml data.

Thank you very much Stanislav.

In my case I had to add the seconds too.

gridUser.setDateFormat("%d-%m-%Y %H:%i", “%Y-%m-%d %H:%i:%S”);