Convert number INT in minutes to TIME in MySQL

Viewed 29948

I need help, my problem is to convert an integer representing minutes into a TIME data type in MySQL example:

 duration   -->   time
    60          01:00:00
    40          00:40:00
    30          00:30:00
   120          02:00:00

The duration column is my field in my database, I need to do a query that field turning into a time data type, in the command SELECT example:

SELECT any_function(duration)

thanks in advance

2 Answers
Related