Good morning I have this query
convert(char(8), Horario.HoraInicio, 108)
but when I give it run
I get 00:00:00
but yosolo I want me to% of 00:00
some idea,
Thanks
Good morning I have this query
convert(char(8), Horario.HoraInicio, 108)
but when I give it run
I get 00:00:00
but yosolo I want me to% of 00:00
some idea,
Thanks
With the function TIME_FORMAT
you specify what you want for example hours, minutes and seconds '%H:%i:%s'
in your case you only need hours and minutes that is why '%H:%i'
is used. With the function time
you get the time of any date-time.
SELECT TIME_FORMAT(TIME('2018-01-01 22:52:59'),'%H:%i');