Re: Dates Again
| From: | Zoltán Németh | Date: | Mon, 31 Mar 2008 20:35:09 +0000 |
| Subject: | Re: Dates Again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272359@lists.php.net to get a copy of this message | ||
VamVan írta:
Hello All, I have a date in 2008-03-29 12:15:00 format. - How can I reduce one day from it? - How can I reduce one hour from it? - How can I add 1 hour to today's date? Thanksjust convert it to a timestamp with strtotime() then you can manipulate it by adding/substracting - 86400 for a day - 3600 for an hour then convert back with strftime() http://hu.php.net/strtotime http://hu.php.net/strftime greets, Zoltán Németh