No database selected SQL : SELECT DATE_FORMAT(data, '%d/%m/%Y %H%:%i') as hora,texto,titulo FROM noticia ORDER BY data DESC