Re: converting a date to a string format
| From: | Chris Lee | Date: | Tue, 13 Feb 2001 21:11:29 +0000 |
| Subject: | Re: converting a date to a string format | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39493@lists.php.net to get a copy of this message | ||
$date = getdate();
$date['mday'] -= 14;
$date = getdate(mktime($date['hours'], $date['minutes'],
$date['seconds'],
$date['mon'], $date['mday'], $date['year']));
echo $date['year'];
echo $date['mon'];
echo $date['mday'];
--
Chris Lee
Mediawaveonline.com
em. lee@mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
"Don" <don@lclcan.com> wrote in message news:3A899FC1.9FDBA362@lclcan.com...
> 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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>