How to convert milliseconds into second minutes and hours

Hi guys i want to convert milliseconds into hours, minutes and seconds in php i am using date(h:s:i, $time); but not working.
Deepak Sharma
Asked 30-10-2019
4

Answer (1)
hi just use this function: function timeConversion($input) {         $uSec = $input % 1000;         $input = floor($input / 1000);         $seconds = $input % 60;         $input = floor($input / 60);         $minutes = $input % 60;         $input = floor($input / 60);         $hour = $input;         return $hour.'Hrs '.$minutes.'Mins '.$seconds.'Sec';     }
Ankur Rajput
Asked 30-10-2019
45 Likes
Comments
Write comment

Submit your answer