I want to convert MySQL Time data type using PHP and Javascript. I know it can be done using FORMAT\_TIME of MySql, but I would like to do the same with php. The Time format is hh:mm:ss by default and I would like to convert it to hh:mm.