The TO_CHAR functions is also available for dates and can support various date format models. Once a date has been converted to a string of characters, it will be sorted differently in an ORDER BY clause.
Some of the most common characters used to specify date format models include MM (two digit month), DD (two digit day), YYYY (four digit year), HH24 (hour using a 24 hour clock), MI (for minute), SS for second. Be careful not to confuse MM (month) and MI (minute).
SELECT first_name, last_name, hire_date, TO_CHAR(hire_date, 'MM/DD/YYYY HH24:MI:SS'), TO_CHAR(sysdate, 'MM/DD/YYYY HH24:MI:SS') FROM employees WHERE last_name LIKE 'K%';
This demonstrates a formatting of a date using the hire date in the employee table (which does not have intersting hour, minute and second information) and the formatting of SYSDATE.