try something like :


function pastDate($days,$format='Ymd')
{
    $secs = ( $days * 86400 );

    return date( $format,time()-$secs );
}

print pastDate(14);

Regards,


Philip Olson
http://www.cornado.com/

On Tue, 13 Feb 2001, Don wrote:

> Does someone have a snippet of code that retrieves today's date,
> subtracts 14 days and converts the result to a string in the form
> "YYYYMMDD"?
> 
> If possible, please reply to my email.
> 
> Thanks,
> Don
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to