1
Good morning/late/evening
I need to select a field TYPE DATE
in mysql, the data is in the format yyyy-mm-dd
, I need you to come back dd/mm/yyyy
. Is there any way to do this in select?
I’ve seen solutions with the function date_format
, but I was unsuccessful.
Thanks in advance.
If you could put your SQL ???
– novic
What exactly didn’t work? How did you execute, can you ask the question? It works like this:
SELECT DATE_FORMAT(NomeDoCampoDate,'%d/%m/%Y') AS DataFormatada
– Ricardo Pontual
So your field in the table is not date? it is a varchar?
– novic
Thanks guys, solved. I posted the answer. I was doing it the wrong way even.
– Jean Mayer
Normally I usually convert the parameter date to the database default and not the other way around
– GabrielLocalhost
Wrong @diegofm, here the field is date type and not varchar.
– Jean Mayer