Sorting by a Date in a Text Field

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 14, 2013   (RSS)

By Dave - January 14, 2013

Hi Sid, 

How about something like this for the ORDER BY:

DATE(entry_date) DESC, listing_price DESC

The MySQL DATE() function convert a DATETIME string to just a date and in my tests seemed to work with the date examples you provided.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com