how to compare date and time
Posted: Sat May 28, 2005 9:09 am
Code: Select all
$year = "2005"; //Year
$month = "06"; //Month
$day = "29"; //Dayany help plz.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$year = "2005"; //Year
$month = "06"; //Month
$day = "29"; //DayCode: Select all
$year = "2005"; //Year
$month = "06"; //Month
$day = "29"; //Day
$yourDate=$year.'-'.$month.'-'.$day;
$today=date('Y-m-d');
$days=(strtotime($yourDate)-strtotime($today))/86400;
echo $days;