Answers for "php get current timestamp in hours minutes and seconds php"

PHP
4

how to add hour minute seconds in php datetime

date('Y-m-d H:i',strtotime('+1 hour +20 minutes',strtotime($start)));
Posted by: Guest on August-13-2020
0

calculate total time from start and end datetime in php

date1 = new DateTime('2006-04-12T12:30:00');
$date2 = new DateTime('2006-04-14T11:30:00');

$diff = $date2->diff($date1);

$hours = $diff->h;
$hours = $hours + ($diff->days*24);

echo $hours;
Posted by: Guest on June-20-2020

Code answers related to "php get current timestamp in hours minutes and seconds php"

Browse Popular Code Answers by Language