2009-10-05 18:11:08
2009-10-05 18:07:13
This should generate 235,how to do it ?
With DateTime objects, you can do it like this:
$date = new DateTime( '2009-10-05 18:07:13' ); $date2 = new DateTime( '2009-10-05 18:11:08' ); $diffInSeconds = $date2->getTimestamp() - $date->getTimestamp();