Re: [PHP] Dates Again
- From: znemeth@xxxxxxxxxxxxxx (Zoltán Németh)
- Date: Mon, 31 Mar 2008 22:35:09 +0200
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?
Thanks
just 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
.
- References:
- Dates Again
- From: VamVan
- Dates Again
- Prev by Date: Dates Again
- Previous by thread: Dates Again
- Index(es):