Grazie Piero, mi sono andato a vedere date_format() e adesso è tutto OK