Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Interval Between Different Dates

$datetime1 = new DateTime('2009-10-11 12:12:00');
$datetime2 = new DateTime('2009-10-13 10:12:00');

$interval = $datetime1->diff($datetime2);
echo $interval->format('%Y-%m-%d %H:%i:%s');
 
PREVIOUS NEXT
Tagged: #Interval #Between #Different #Dates
ADD COMMENT
Topic
Name
3+6 =