I have integer milliseconds like 619308. How can I parse it to format HH:MM:SS:UU by using Javascript or PHP ???
Sorry for my bad English
I have integer milliseconds like 619308. How can I parse it to format HH:MM:SS:UU by using Javascript or PHP ???
Sorry for my bad English
Your number is pretty small for milliseconds but...
Try this:
<?php
function formatp($input)
{
$hours = (int)($minutes = (int)($seconds = (int)($milliseconds = (int)($input * 1000)) / 1000) / 60) / 60;
return $hours.':'.($minutes%60).':'.($seconds%60).(($milliseconds===0)?'':'.'.rtrim($milliseconds%1000, '0'));
}
echo formatp(4.2225662134);
Use Date()
var d = new Date( 619308 );
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1;
var curr_year = d.getFullYear();