date prob. subtracting days
| From: | Merlin | Date: | Mon, 19 May 2003 08:17:04 +0000 |
| Subject: | date prob. subtracting days | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148139@lists.php.net to get a copy of this message | ||
Hi there,
I want to subtract todays date from a date in the past and know if this date
is more than 14 days back. Somehow I am lost in the date, timestamp, mktime
joungle :-) So far I do get the days back, but only if they are in the same
month. It just takes care of the day, not of month and year. I know that
this could be easily done with mysql functions, but in this case I need to
do them in php after getting the whole dataset.
Here is the try I made:
$date[send] = date('d-m-Y',$row4->timestamp);
$date[today] = date("d-m-Y");
$dif = $date[today] - $date[send];
echo $dif;
Thanx for any help on that,
Regards,
Merlin