What else can it do other than convert dates to time strings Jason? 

-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 10:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] adding days to a given date


On Wednesday 31 March 2004 17:08, Hawkes, Richard wrote:
> You'll want to do something like this:
>
>   $timeStamp = strtotime("2004-04-29");
>   $timeStamp += 24 * 60 * 60 * 7; // (add 7 days)
>   $newDate = date("Y-m-d", $timeStamp);
>
> The 'strtotime' function converts all sorts of standard dates to the Unix
> Epoch seconds (seconds since 1/1/1970). You then just add the required
> seconds!

strtotime() can do more than that, time to RTFM.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
QOTD:
        "My life is a soap opera, but who gets the movie rights?"
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to