MSUK1 Posted March 27, 2011 Share Posted March 27, 2011 Hello, i have a user entering dates in the format DD-MM-YYYY --> 11-12-02 when i try to sort by DESC [nearest date first] i am getting sort problems for example i'll get this.. 11-12-02 12-07-02 13-08-02 whats the best way to sort this to get the dates correct? Link to comment https://forums.phpfreaks.com/topic/231867-php-sql-sort-code/ Share on other sites More sharing options...
chris.smith Posted March 27, 2011 Share Posted March 27, 2011 Hello, i have a user entering dates in the format DD-MM-YYYY --> 11-12-02 when i try to sort by DESC [nearest date first] i am getting sort problems for example i'll get this.. 11-12-02 12-07-02 13-08-02 whats the best way to sort this to get the dates correct? What datatype do you use in your database? Cheers. Link to comment https://forums.phpfreaks.com/topic/231867-php-sql-sort-code/#findComment-1192903 Share on other sites More sharing options...
MSUK1 Posted March 27, 2011 Author Share Posted March 27, 2011 what do you mean, sorry Link to comment https://forums.phpfreaks.com/topic/231867-php-sql-sort-code/#findComment-1192939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.