mysql minutes to hours and minutes

前端 未结 5 1233
梦谈多话
梦谈多话 2021-01-12 13:50

I have a table that return minutes from a task and I\'d like to convert into hours and minutes.

my select is:

select
m.mat_nome as \'Matéria\',
round         


        
5条回答
  •  走了就别回头了
    2021-01-12 14:25

    You should look up FLOOR() function, and simple math. You need something like

    CONCAT(FLOOR(minutes/60),'h ',MOD(minutes,60),'m') 
    

提交回复
热议问题