Re: converting DATETIME to a readable date.

From: Date: Sun, 15 Apr 2001 00:46:54 +0000
Subject: Re: converting DATETIME to a readable date.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48608@lists.php.net to get a copy of this message
Hi DRN, @ 8:34:08 PM on 4/14/2001, DRN wrote: ... > $date = $row["date"]; > $new_date = date("l, j M Y, G:i:s", strtotime($date)); > ~~ > but I cannot get this to work :(, I get an "unexpected error in > date()" ... Try this and see if it functions correctly: <?php $date = str_replace('-','/',$row["date"]); $new_date = date("l, j M Y, G:i:s", strtotime($date)); ?> Your original code gives me the same error, but the above code functions normally for me. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies.

« previous php.general (#48608) next »