I need to reformat the output of the 'dates' field from '2009-04-08' to
'Wed. Apr. 8th'. Any help would be appreciated.
Thanks.
---
for ($counter = 0; $counter mysql_num_rows($resultID); $counter++);
while ($row = mysql_fetch_object($resultID))
{
print tr;
print td . $row-dates .
Jack Lauman wrote:
I need to reformat the output of the 'dates' field from '2009-04-08' to
'Wed. Apr. 8th'. Any help would be appreciated.
You can either do it using mysql date formats (see
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format)
or something
See the date function
Http://www.php.net/date
Bastien
Sent from my iPod
On Apr 8, 2009, at 21:41, Jack Lauman jlau...@nwcascades.com wrote:
I need to reformat the output of the 'dates' field from '2009-04-08'
to 'Wed. Apr. 8th'. Any help would be appreciated.
Thanks.
---
for ($counter
I am trying to format the month portion of a date that I am trying to
pull from MySQL to be placed into a drop down menu to modify the date.
I have tried several ways and none seem to be working.
I am pulling the date out of MySQL with:
$sDate = explode(-, $row_events['Sdate']);
And then
You got the right idea, but you're making it more complicated than it needs to
be.
your $sDate after using explode() is going to contain an array. strtotime
doesn't take an array, it takes a string.
$monthName = date(F, strtotime($row_events['Sdate']));
$monthNumber = date(m,