Calculate the difference between two dates using PHP

You can use this PHP code snippet to calculate the difference between two dates.


									<?php

$date1 = date_create("2015-06-17");
$date2 = date_create("2017-11-03");
$diff = date_diff($date1,$date2);
echo $diff->days;

?>
								

crypto.man

Formal education will make you a living; self-education will make you a fortune.

Comments (0)

No Comments Yet.