How to get millisecond between two DateTime objects?
$date = new DateTime();
$date2 = new DateTime(\"1990-08-07 08:44\");
I t
DateTime dates are only stored as whole seconds. If you still need the number of milliseconds between two DateTime dates, then you can use getTimestamp() to get each time in seconds (then get the difference and turn it into milliseconds):
$seconds_diff = $date2.getTimestamp() - $date.getTimestamp()
$milliseconds_diff = $seconds_diff * 1000