shill Posted April 24, 2006 Share Posted April 24, 2006 I’m trying to format the date from my query. Here’s what I’ve got so far.[code]if ($r = mysql_query ($query)) { while ($row = mysql_fetch_array ($r)) { print "<tr><td>{$row['show_date']}</td> <td>{$row['show_city']}, {$row['show_state']} {$row['show_country']}</td> <td>{$row['show_venue']}</td> \n"; }[/code]I think I may need something like this but I’m not sure.[code]$show_date = date("m.d.y");[/code]Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/8285-formating-date-from-mysql-query/ Share on other sites More sharing options...
wildteen88 Posted April 24, 2006 Share Posted April 24, 2006 You'll want to do something like this:[code]$date = date("d.m.y" , strtotime($row['show_date']))[/code] Link to comment https://forums.phpfreaks.com/topic/8285-formating-date-from-mysql-query/#findComment-30233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.