I have a table TEST with a DATETIME field, like this:
DATETIME
ID NAME DATE 1 TESTING 2014-03-19 20:05:20.000
Test this query.
SELECT *,DATE(chat_reg_date) AS is_date,TIME(chat_reg_time) AS is_time FROM chat WHERE chat_inbox_key='$chat_key' ORDER BY is_date DESC, is_time DESC