Page 1 of 1

calculate time.

Posted: Wed Aug 29, 2007 8:12 am
by nickchou
I use $time=date("Y-m-d"); to get current time.
How can I get the expiry date($expiry) which is 1 month later?

Thanks a lot!...
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.

Posted: Wed Aug 29, 2007 8:27 am
by aceconcepts

Code: Select all

date("Y-m-d", strtotime($expiry))
http://uk.php.net/strtotime

Posted: Wed Aug 29, 2007 8:29 am
by xpgeek
Also you can use date and mktime.
http://php.net/mktime