Subtracting two dates

From: Date: Tue, 11 Mar 2003 04:02:45 +0000
Subject: Subtracting two dates
Groups: php.general 
Request: Send a blank email to php-general+get-139080@lists.php.net to get a copy of this message
There are a lot of artlicles on this but I need a simple solution. I need to subtract two dates as follows: $date = date("Y-m-d"); $date1 = "2003-03-03"; $differencedate = ($date - $date1); echo $differencedate; When I do this I get 0. Please help! -------------------------------------------------------------------------- The content of this email message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments.

« previous php.general (#139080) next »