Re: formating numbers & date
| From: | Jeff Bluemel | Date: | Thu, 05 Dec 2002 01:29:54 +0000 |
| Subject: | Re: formating numbers & date | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127079@lists.php.net to get a copy of this message | ||
thanks...
I will play with this, and let ya know if I have a problem... looks easy
enough.
Jeff
"Justin French" <justin@indent.com.au> wrote in message
news:BA14EDD8.19212%justin@indent.com.au...
> on 05/12/02 11:15 AM, Justin French (justin@indent.com.au) wrote:
>
> > Hi,
> >
> > <?
> > $date = '2002-12-04 23:21:49';
> > $newdate = date('m/d/Y', strtotime($date));
> > echo $newdate;
> > ?>
>
> Whooops, forgot the time bit!
>
> Should be
>
> <?
> $date = '2002-12-04 23:21:49';
> $newdate = date('n/j/Y g:i:s a', strtotime($date));
> echo $newdate;
> ?>
>
> echo's 12/4/2002 11:21:49 pm
>
> also fixed the leading zero's problem :)
>
>
> Justin French
> --------------------
> http://Indent.com.au
> Web Development &
> Graphic Design
> --------------------
>