date math

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm using PHP 4.4.4.  If I have a date of the form

       $curDate = date("Y-m-d");

How do I get the date 6 months from this date?

Thanks, - Dave

Re: date math wrote:

Quoted text here. Click to load it

You might try:
$oldDate = date("Y-m-d", strtotime("6 months ago"));

Kim André Akerø
(remove NOSPAM to contact me directly)

Site Timeline