Re: Working with dates

From: Date: Thu, 23 May 2002 19:06:02 +0000
Subject: Re: Working with dates
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19407@lists.php.net to get a copy of this message
Forget my last email. Similar but before I told you how to do it from todays date. You need to parse the $effdate. Below would only work for 1 number months. (i.e not Oct,Nov,Dec) Find where / occurs in the string and you will be laughing. Once you have those numbers in $day,$month,$year you will be able to use the bottom two lines of below to add three months on. $effdate= "1/15/2002"; $day = substr($effdate,2,2); $month = substr($effdate,0,1); $year = substr($effdate,5,4); $threeMonthsAhead = mktime(0,0,0,$month+3,$day,$year); $dateInYourForm = date("m/d/Y",$threeMonthsAhead); Cheers Steve "Manuel" <manuel@ochoa-usa.com> wrote in message news:20020523140621.9949.qmail@web21412.mail.yahoo.com... > > Can anybody help me with this? > > How do you take a known date and add three month to it? > > Example: > > $effdate= "1/15/2002" > > > > --------------------------------- > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience

« previous php.db (#19407) next »