0
I’m using a field of sorts Date
in the archive HTML
, to facilitate the selection of the date, but it will be saved to the bank in American format yyyy/mm/dd
,
I did the following query
to transform this data and show in a dd/mm/yyyy
, but it didn’t work:
$seleciona= mysqli_query($conexao,"
SELECT TO_Char(r.Data,'dd/mm/yyyy'),r.CodReuniao Datas
FROM reuniao r
group by TO_Char(r.Data,'dd/mm/yyyy')
order by Datas ASC"
);
Have some syntax error?
Has syntax error yes.
TO_CHAR
is Oracle (and maybe some other SGBD). Mysql does not work like this. MaybeDATE_FORMAT
interest you– Bacco
Voce knows any possible solution?
– Vitor Matheus
See the yellow frame links above, and the DATE_FORMAT function in the Mysql manual
– Bacco
https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format
– Bacco