diff_date ()

function diff_date ($sql_date1, $sql_date2 = 'now')

Use this function to calculate number of days between two dates, $sql_date1 & $sql_date2.

$sql_date1 = the first date

$sql_date2 = the second date, you can also use 'now' to use current date.

Example 1

<?php
require './includes/user_init.php';

$d1 = '2010-01-05';
$d2 = '2010-02-01';
echo (diff_date ($d1, $d2)); // 27
?>

: @ 07:00am
Last Updated: @ 07:00am

There is no comment. Why not be the first?

More Comments/Post Your Own

Advertisement

Latest Comments

Most Commented

Online Users

There are 130 users online.

Connect

Connect with us on Facebook

Newsletter

Subscribe to our newsletter for the latest updates and exciting promotions!