RE: [PHP] dateformat
| From: | Rick Emery | Date: | Mon, 18 Mar 2002 22:29:17 +0000 |
| Subject: | RE: [PHP] dateformat | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89040@lists.php.net to get a copy of this message | ||
<?php
$a = "20020211150245";
$b =
ereg_replace("([0-9]{4,4})([0-9]{2,2})([0-9]{2,2})([0-9]{2,2})([0-9]{2,2})([
0-9]{2,2})","\\1-\\2-\\3 \\4:\\5:\\6",$a);
print $b;
?>
-----Original Message-----
From: Sven Jacobs [mailto:sjacobs@contenteurope.com]
Sent: Monday, March 18, 2002 5:03 AM
To: php-general@lists.php.net
Subject: [PHP] dateformat
hey all
I want to convert 20020211150245 into 2002-02-11 15:02:45.
Does somebody have the correct conversion for this ?