Canman2005 Posted May 13, 2007 Share Posted May 13, 2007 Hi all I have a standard QUERY, on the QUERY I use a ORDER BY id to sort the data that is returned. One of my fields in my table is a date field and it is held in the following format "YYYY-MM-DD". Is it possible to do a ORDER BY date using the date format I use.? Any help would be sweet Thanks Dave Link to comment https://forums.phpfreaks.com/topic/51219-solved-order-by-question/ Share on other sites More sharing options...
marmite Posted May 13, 2007 Share Posted May 13, 2007 what do you get when you just try "order by date_field asc" ? is the system not clever enough to work it out? what data type is the field defined as? is it a date type? Link to comment https://forums.phpfreaks.com/topic/51219-solved-order-by-question/#findComment-252266 Share on other sites More sharing options...
Barand Posted May 13, 2007 Share Posted May 13, 2007 "YYYY-MM-DD" format is perfect for ORDER BY Link to comment https://forums.phpfreaks.com/topic/51219-solved-order-by-question/#findComment-252286 Share on other sites More sharing options...
Canman2005 Posted May 13, 2007 Author Share Posted May 13, 2007 Thanks Link to comment https://forums.phpfreaks.com/topic/51219-solved-order-by-question/#findComment-252289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.