Sunday, 30 October 2016

Hi All,

If you want to find the difference between two dates (Eg. current date and another date) use this simple code

<?php

$current = time(); // Current date and time
$testdate= strtotime("2016-10-20");
$daydiff = $current - $testdate;
echo floor($daydiff / (60 * 60 * 24));

?>

Using this code you can find the fine by calculating day difference between current date and book issue date.

No comments:

Post a Comment