Re: Returning a formated dat
| From: | Robert | Date: | Fri, 02 Feb 2001 15:12:13 +0000 |
| Subject: | Re: Returning a formated dat | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6321@lists.php.net to get a copy of this message | ||
try:
$date=substr("$dat",
0,2)."/".substr("$dat",2,2)."/".substr("$dat",-4);
----- Original Message -----
From: "Ben Cairns" <BenC@intasept.com>
To: <php-db@lists.php.net>
Sent: Friday, February 02, 2001 3:13 AM
Subject: [PHP-DB] Returning a formated dat
> I have a date stored in a MySQL field in a format like this:
>
> For example, 02/02/2001 (Today) would be stored as:
> 02022001
>
> What I need to do is to format that so that it looks like:
> 02/02/2001
>
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: BenC@intasept.com
> Web: http://www.intasept.com
>
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK......"
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>