Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Vukašin Stojkov

Sorting not working properly with dates


We have been using your plugin for quite some time but we seem to have a big problem when we try to sort our dates. As you can see, in the attached video, it is not working as intended. In this case we are trying to sort by the ”Datum prijema” column, but it usually sorts dates by the first number or it sorts only few dates properly.

Also, sometimes it works for 90% of the rows, but as you can clearly see in the video, there are again few dates that are not in the right place at all.

We are using date picker as a custom field type.

We have also tried to change the date format, but still, it wouldn’t work.

Video attachment:

2 years, 4 months ago
Stefan van den Dungen Gronovius

Can you check your database and see what the actual date format is for your ACF fields in the post_meta table? By default ACF stores date picker field as a (somewhat uncommon) format ‘Ymd’ (20223101). Our plugin with the ACF column sorts exactly based on that format, in this case, numeric sorting.

If sorting does not work as expected, I suspect that your data is not stored that way, or you have some hooks in place that change the behavior for sorting.

Can you check the data in your database and share that with me (feel free to share this with me at and maybe have a look at the main query with the plugin ‘Query Monitor’.

2 years, 4 months ago

You must be logged in to reply to this topic.