Re: formating numbers & date

From: Date: Thu, 05 Dec 2002 02:32:48 +0000
Subject: Re: formating numbers & date
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-127091@lists.php.net to get a copy of this message
worked great... the other method may be a little quicker, but this code is easier for me to understand, and although it is used in a loop there really is no visible difference in how quickly it displays. thanks, 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 > -------------------- >

« previous php.general (#127091) next »