Re: [PHP] Adding one month to a given date

2004-02-02 Thread Jochem Maas
here's a thought: - // using strtotime() you can turn your date into a unixtimestamp. e.g. $unixTimeStamp = strtotime('2003-10-19'); // using getdate($unixTimeStamp) you can get the consituent parts of the // date. e.g. $dateParts = getdate($unixTimeStamp); // then create a new

RE: [PHP] Adding one month to a given date

2004-02-02 Thread Vail, Warren
I've found the following works best for me, takes into consideration leapyears and daylight savings time, etc. $datetime = date("Y-m-d H:i:s",strtotime($inputdatetime." + 1 month")); http://www.php.net/manual/en/ref.datetime.php Warren Vail -Original Message- From: merlin [mailto:[EMAI