Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

calculate time difference php

$time1 = new DateTime('09:00:59');
$time2 = new DateTime('09:01:00');
$interval = $time1->diff($time2);
echo $interval->format('%s second(s)');

Result: 1 second(s)
 
PREVIOUS NEXT
Tagged: #calculate #time #difference #php
ADD COMMENT
Topic
Name
8+1 =