Date Format Functions
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).