Re: diference between date
| From: | Ruslan Ohitin | Date: | Thu, 21 Jun 2001 04:24:54 +0000 |
| Subject: | Re: diference between date | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-7960@lists.php.net to get a copy of this message | ||
Hello Danilo,
Try to use this:
$d1 = strtotime("07-05-2001"); // $d1 and $d2 are unix timestamps.
$d2 = strtotime("06-05-2001");
$diff_sec = $d2 - $d1; // difference in seconds.
$diff_days = $diff_sec / (60 * 60 * 24); // difference in days
--
Best regards,
Ruslan Ohitin
mailto:rus@bagan.ru
DM> Hi there;
DM> How could I get the diference between two dates
DM> for exemplo:
DM> 07-05-2001 and 06-05-2001 I wil get this date from my sql.
DM> How could I do that??
DM> Thank you very much.
DM> Danilo Meles