Codice PHP:
SELECT idEvento  FROM tabella ORDER BY date_format(dataevento,"%Y-%c-%d"