RE: [PHP] Dates

From: Date: Tue, 28 May 2002 18:22:07 +0000
Subject: RE: [PHP] Dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-99523@lists.php.net to get a copy of this message
Something like this.. $start = "2002-10-9"; $end = "2002-11-16"; $arStart = explode("-", $start); $arEnd = explode("-", $end); $startTime = date("U", mktime(0,0,0,$arStart[1], $arStart[2], $arStart[0])); $endTime = date("U", mktime(0,0,0,$arEnd[1], $arEnd[2], $arEnd[0])); $dif = $endTime - $startTime; // in seconds That will do it but you could simplfy it with some more advanced techniques. -Jared -----Original Message----- From: Jeroen Timmers [mailto:maillist@start4me.nl] Sent: Tuesday, May 28, 2002 2:17 PM To: php-general@lists.php.net Subject: [PHP] Dates i have two dates for example 2002-10-9 and 2002-11-16 Is there a function to see how many day's between thore date's is? Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#99523) next »