RE: [PHP] Subtracting days from a date
| From: | Jesper Vad Kristensen | Date: | Wed, 26 Jul 2000 12:26:15 +0000 |
| Subject: | RE: [PHP] Subtracting days from a date | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8280@lists.php.net to get a copy of this message | ||
Hi axbom,
> e.g. I want the to subtract ten days
> from 2000-07-05 (Y-m-d) and
> end up with 2000-06-25. Tell
> me there's an easy command for
> this =) ?
Hey, here's my advice: when you do stuff with dates (and store them) just
work in seconds. That way you can quite easily subtract the number of days
you want. Then, when you need to present the date, just format it as you
want.
:)
--Jesper