Usually, the format that we used to save time in our table is H:i:s in which the result is something like this: 14:00:00 which is in 24 hour format. So to make your time more readable to users, you need to format it in 12 hour format.
Code
<?php
$time="19:04:28";
echo date('h:i:s A', strtotime($time);
?>
Output
0 comments:
Post a Comment