Re: help with date formatting

From: Date: Mon, 18 Mar 2002 18:04:22 +0000
Subject: Re: help with date formatting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88971@lists.php.net to get a copy of this message
On Mon, 18 Mar 2002, Ryan wrote: > Hi, I'm trying to create an events page, where it shows the posted > events. I enter data using phpmyadmin. Currently, the ouput is like > this: > > 2002-03-06 > > I'm having trouble with the formatting of the date. I'm using the type > date with the function now, so it shows the current date when I post an > event. Here is what I would like: > > Wednesday, March 5th, 2002 I'm guessing you're fetching the date out of a MySQL table. Use strtotime() to convert that into a timestamp, then use date() to convert that into the format you want. Both are well-documented in the manual. miguel

« previous php.general (#88971) next »