Re: Date Formatting

From: Date: Wed, 13 Sep 2000 05:48:22 +0000
Subject: Re: Date Formatting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16497@lists.php.net to get a copy of this message
DISCLAIMER: I didn't test this code. On 9/13/00 1:47 AM this was written: > On 9/13/00 2:27 AM this was written: > >> I have a date in a table in the format d-m-y, but when it is read out onto >> the >> screen it comes out in the opposite order. What I am hoping to do is get it >> into m-d-y order, or better still long format (eg. 9th September, 2000). >> Does >> anyone know if this is possible, and if so how it is done? > > $thedate = explode("-",<date formatted in Y-m-d>); > echo date("jS F, Y", mktime(0,0,0,$thedate[1], $thedate[2], $thedate[0]); > > This will do it for you. > -- -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.general (#16497) next »