JS -
function getCharCode(event)
{
var charCode = (event.which) ? event.which : event.keyCode;
// Might want to get the character representation of the Unicode keycode -
var character = String.fromCharCode(keycode);
}
HTML -
Let me know if you need clarification or this does not work.
SELECT * FROM table
WHERE concat(date(appt_date)," ",time(start_time)) > NOW( )
ORDER by appt_date desc, start_time desc, end_time desc