Re: Changing the format of a date
| From: | Ignatius Reilly | Date: | Wed, 05 Nov 2003 20:50:05 +0000 |
| Subject: | Re: Changing the format of a date | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-22008@lists.php.net to get a copy of this message | ||
$months = array( "Jan" => "01", ... ) ;
$str = "Jun 15 1956" ;
$str = explode( " ", $str ) ;
$str = $months[$str[0]] ."/".$str[1] ."/". $str[2] ;
HTH
Ignatius
_________________________
----- Original Message -----
From: "Herhuth, Ron" <Ron.Herhuth@tatumpartners.com>
To: <php-windows@lists.php.net>
Sent: Wednesday, November 05, 2003 9:09 PM
Subject: [PHP-WIN] Changing the format of a date
I have a current date in the format:
Jun 15 1956
I need to convert it to:
06/15/1956
Is there a quick way to do this in PHP?
Ron
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php